Beyond 3 steps...

tgiaccone's picture
So I've followed the steps outlined in the "Create an Axis2 Web Service in 3 Steps Using Eclipse" and all is fine and the service works. Now I want to make some changes, add a new service, change the signatures of the methods in my class. How do I go back and generate the wsdl and use these tools to create an aar file. The 3 step tutorial is great to prove you've got the tools installed, but how do I move from that proof of concept to iteratively building my web service?
samindaw's picture

Hi, you can do this

Hi, you can do this easily. To change the existing service, one way is to after doing the changes to the classes, stop the WSAS server and repeat the step 3. the other way is much more simpler but initially you need to do some work. In the WSAS distribution open the file "\conf\axis2.xml" and change 'false' to 'true'. Then make sure the eclipse ide has the build automatically enabled (Project -> Build Automatically). Then restart the WSAS server which is running inside eclipse. That's it. Now do your changes to your java classes. Each time you save the class (Ctrl + S), the changes are automatically applied to the service within a couple of seconds. WSDL will be generated automatically by the WSAS server. There is a tutorial explaining this in detail, but it is not yet published. will post the url here when it is published. To create an aar, use the "Dump WSAS archive" button in the tool bar (having the icon of a box with a red/orange down arrow). It will show all the axis2 web services present in the eclipse workspace. Select the web service and click "Finish". an aar file will be generated inside the "dumpAAR" folder (which can be located in the eclipse folder). HTH Regards, Saminda
tgiaccone's picture

'false' to 'true'

There are a lot of parameters in that file at least 13 occurrences by my count. After looking them over, I assume you mean that I should change this line (line 28) <parameter name="hotupdate">false</parameter> to this: <parameter name="hotupdate">true</parameter> Is that correct? Tony
tgiaccone's picture

Follow up on wsdl

I notice when I use this technique, that no WSDL file is generated in the local eclipse workspace. There is however, a wsdl file in the WSAS server. I assume some set of steps associated with publishing this service in the server creates the wsdl file. Is there an easy way to make that happen locally. Second follow up. It looks like you create a services folder under the WebContent folder. WehContent:WEB-INF:services:MyServiceName MyServiceName is a link to a directory on the file system, where the service is deployed. Am I correct in assuming that an aar file is just a jar of the contents of the folder MyServiceName? Is there a simple way to create an aar file using the wizard, or do I need to create an ant file to do that? Tony
samindaw's picture

Hi Tony, if u had any doubts

Hi Tony, if u had any doubts earlier on how to modify your service once published follow the tutorial http://wso2.org/library/tutorials/live-edit-your-axis2-web-service-using-eclipse which i got it publish last night. No the wsdl is not created in the workspace. you will need to save it manually from the browser. There is a another wizard available to create the wsdl from a class present in the eclipse workspace. That tool is handy only if you have not already published the class as a service and you are lazy to setup the wsas server and go through the web service wizard. In a nutshell how to use that tool (i really need to write more documentation on those small tools) is, 1. click on the button "WSO2 WSAS Java2WSDL tool" 2. and in the first page specify fully qualified class name of the class which you want to generate the wsdl. 3. Specify the path(s) of the compiled classes and dependant classes for that service class by clicking "Add folder" and/or "Add jar". 4.Click Next, and in the 2nd page specify any namespace details and service name. Click next. 5.In the 3rd and last page specify the location which you prefer for the generated wsdl to be stored. Here you can select eclipse workspace project location. click finish. Yep you are correct. That's where all the services are created, in a dynamic web project. If the service is not published in the server yet then the service folder really is in the dynamic web project WebContent:WEB-INF:services path (not as a link to some other place). When publishing it to a server technically we have to move the service folder to the service repository of the server in order for the server to see the service. Then we link that location back to the eclipse project since it helps to view and debug the web service if you need. Actually aar/jar/mar all those extensions are just to refer certain type of content being present in those files. Other than that they are all just zip files. for example if the file is a jar file, u can expect the file to have a manifest file in a certain location with relevant manifest headers. if it is a aar file then you can expect a service.xml file to be present in a certain location defining the service. etc. no u misunderstood me. after clicking finish in the wizard in the dumpAAR folder there is a folder called "target" which will contain the aar file. you dont need to run the ant to create it. the ant file is just a support file incase you wanted to change the java sources and recreate the aar file without loading back the eclipse. HTH Saminda
samindaw's picture

yep. you are correct.

yep. you are correct.
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)