I am trying to create a web service, my tools of trade are:
**
Axis2, Eclipse, Tomcat, Ant
**
I need to create a web service from Code, i.e. Write a basic java class which will have the methods to be declared in the WSDL. Then use java2WSDL.sh to create my WSDL.
So, is this approach correct:
- Write my Java class with actual business logic
package packageNamel; public class Hello{ public void World(String name) { SOP("Hello" + name); } }
- Now, when I pass this Hello.java to java2WSDL.sh, this will give me the WSDL.
Finally, I will write the services.xml file, and create the Hello.aar with following dir structure:
Hello.aar
- packageName
- Hello.class
- META-INF
- services.xml
- MANIFEST.MF
- Hello.WSDL
- packageName
Now, I assume, my service will be deployed when I put the aar in tomcat1/webapps/axis2/WEB-INF/services
But, here comes my problem, HOW DO I ACCESS THE METHOD World(String name)
???!!, i.e. I am clueless about the client code!
Please enlighten me on making a very basic web service and calling the method. The above described 3 steps might be wrong. It's a community wiki, feel free to edit.
Thanks