Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Creating a top-down Axis2 Web service"
m (making changes for axis2 1.3 and later) |
|||
Line 43: | Line 43: | ||
# This page is the web services publication page, accept the defaults.<br />[[Image:Ws_tdAxis2WizardPublishPage.png]]<br />Click Finish. You will see the newly created skeleton page gets pop up in the Editor. If you need you can edit the skeleton to include your area service logic. But for the moment We will accept the defaults settings.<br /> | # This page is the web services publication page, accept the defaults.<br />[[Image:Ws_tdAxis2WizardPublishPage.png]]<br />Click Finish. You will see the newly created skeleton page gets pop up in the Editor. If you need you can edit the skeleton to include your area service logic. But for the moment We will accept the defaults settings.<br /> | ||
# Here after the skeleton generation the user need to fill the nessesary parts of the service skeleton with the bussiness logic. In this example the CalculatedRectArea method TODO plus the exception must be replace with appropriate logic. For that we need some changes in the build system to auto reflect the change in the deployed service. One thing is we need to make sure that Build Automatically is enabled in the Project Menu. Then we need to change the output location of the project to the location where the service is deployed in the local web service runtime attached to the project. As in this example to the folder WebContent -> axi2-web -> WEB-INF -> services -> Axis2TestWs directory.<br />[[Image:sk_1.png]]<br /><br /> | # Here after the skeleton generation the user need to fill the nessesary parts of the service skeleton with the bussiness logic. In this example the CalculatedRectArea method TODO plus the exception must be replace with appropriate logic. For that we need some changes in the build system to auto reflect the change in the deployed service. One thing is we need to make sure that Build Automatically is enabled in the Project Menu. Then we need to change the output location of the project to the location where the service is deployed in the local web service runtime attached to the project. As in this example to the folder WebContent -> axi2-web -> WEB-INF -> services -> Axis2TestWs directory.<br />[[Image:sk_1.png]]<br /><br /> | ||
− | # So now we have done the nessesary thing to auto deploy our TD created web service. Now we go ahead and implement the skeleton. Replave the TODO plus the exception with the following logic foe calculating the Area. org.tempuri.areaservice.Area area = new org.tempuri.areaservice.Area(); area.setArea( parameters.getParameters().getHeight() * parameters.getParameters().getWidth(); return area;<br />[[Image:Ws_tdAxis2WebServiceImplJavaFile.png]]<br />Tigger a auto build after saving. You will notice in the console that the service getting re deployed in the server.<br /> | + | # So now we have done the nessesary thing to auto deploy our TD created web service. Now we go ahead and implement the skeleton. Replave the TODO plus the exception with the following logic foe calculating the Area. org.tempuri.areaservice.Area area = new org.tempuri.areaservice.Area(); area.setArea( parameters.getParameters().getHeight() * parameters.getParameters().getWidth(); return area;<br />[[Image:Ws_tdAxis2WebServiceImplJavaFile.png]]<br /><br />axis2 1.3 and later image<br />[[Image:Ws_tdAxis2WebServiceImplJavaFile_1.3.jpg]]<br />Tigger a auto build after saving. You will notice in the console that the service getting re deployed in the server.<br /> |
# Now we can run the Dynamic Web Project on the server to see our top down created web service running on axis2 server. For that Select the Axis2WSTest dynamic web project and select Run -> Run As -> Run on Server<br />[[Image:Ws_tdAxis2RunOnServer.png]]<br />Click Next. | # Now we can run the Dynamic Web Project on the server to see our top down created web service running on axis2 server. For that Select the Axis2WSTest dynamic web project and select Run -> Run As -> Run on Server<br />[[Image:Ws_tdAxis2RunOnServer.png]]<br />Click Next. | ||
# Make sure you have the Axis2WSTest dynamic web project on the Configured project.<br />[[Image:Ws_tdAxis2RunOnServer_Addproject.png]]<br />Click Next. | # Make sure you have the Axis2WSTest dynamic web project on the Configured project.<br />[[Image:Ws_tdAxis2RunOnServer_Addproject.png]]<br />Click Next. | ||
− | # This page is the web services publication page, accept the defaults.<br />[[Image: | + | # This page is the web services publication page, accept the defaults.<br />[[Image:D3.png]]<br />Click Finish. |
# By doing the above test the Axis2 server webapp will be automatically deployed on the configured servlet container and will display the axis2 home page.<br />[[Image:Ws_tdAxis2ServletPage.png]]<br /><br /> | # By doing the above test the Axis2 server webapp will be automatically deployed on the configured servlet container and will display the axis2 home page.<br />[[Image:Ws_tdAxis2ServletPage.png]]<br /><br /> | ||
# By selecting services can view the available services. The newly created AreaService will be available there.<br />[[Image:Ws_tdAxis2ServiceServletPage.png]]<br /><br /> | # By selecting services can view the available services. The newly created AreaService will be available there.<br />[[Image:Ws_tdAxis2ServiceServletPage.png]]<br /><br /> | ||
# If you need to test the newly creating AreaService with the WSE. at the first page of the skeleton scenario you can increase the slider to the test lever so that the created service can be tested against the Web Services Explorer.<br />[[Image:Ws_tdAxis2WebServiceWizard_ScaleStart.png]]<br /><br /> | # If you need to test the newly creating AreaService with the WSE. at the first page of the skeleton scenario you can increase the slider to the test lever so that the created service can be tested against the Web Services Explorer.<br />[[Image:Ws_tdAxis2WebServiceWizard_ScaleStart.png]]<br /><br /> | ||
− | # So after the normal pagers it will add another additional page to select the test facility. Select the Web Service Explorer<br />[[Image: | + | # So after the normal pagers it will add another additional page to select the test facility. Select the Web Service Explorer<br />[[Image:Wse_2.jpg]]<br /><br /> |
# Now For testing of the newly created AreaService with the WSE, at the end of the scenario it will launch the Web Services Explorer with the nessesary configuration loaded so that user can invoke the service easily.<br />[[Image:Ws_tdAxis2WSE.png]]<br /><br /> | # Now For testing of the newly created AreaService with the WSE, at the end of the scenario it will launch the Web Services Explorer with the nessesary configuration loaded so that user can invoke the service easily.<br />[[Image:Ws_tdAxis2WSE.png]]<br /><br /> | ||
# Please refer the [http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/WebServiceExplorer.html Using Web Service Explorer to test a Web service] for more details. <br /><br /><br /><br /> | # Please refer the [http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/WebServiceExplorer.html Using Web Service Explorer to test a Web service] for more details. <br /><br /><br /><br /> |
Revision as of 09:30, 21 June 2008
| ||||||||||||||||
|