Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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"
Line 44: | Line 44: | ||
# 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:sk_2.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:sk_2.png]]<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: | + | # 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: | + | # 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:d3.png]]<br />Click Finish. | # 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 | + | # 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 /> |
Revision as of 15:41, 7 May 2008
| ||||||||||||||||
|