This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have started learning webservices development using Axis2.
We need to follow the contract first approach. I have created this simple WSDL.
Using this WSDL I need to write the webservice. Can someone please let me know how can I generate the classes from this WSDL. Is there a tool/command available to do so? Once the classes are generated I can write my businesslogic in them and then expose the service to the clients.
but it says
"This will generate only those bindings necessary for the client.".
But I need to generate the classes for creating the service. Is this even the right approach to creating webservices, that is, first write the wsdl, then generate the webservice classes and then put your business logic in those classes?
Joined: Aug 26, 2008
Top down (wsdl first/ contract first) or bottom up (code first) depends on the requirement. Suppose you have same existing code and want to expose as webservice then you would go for code first but if you are developing from scratch then contract first can be a good approach. Developer would like to do code first while business analyst would like to have contract first. There are lot of discussion you can find on net.
Regarding generation of classes, see the "Implementation Template Description" heading in the axis tutorial link you have mentioned. Here it generates template implementation where you can write your business logic.
Hi, I am using java,tomcat 5.5 ,Axis2 and eclipse. I created .aar file in deployment directory while going through top down approach.After that when i typed "http://localhost:8080/axis2/" i got the exception as "org.apache.jasper.JasperException" pointing root cause as "java.lang.NullPointerException".Any one can give the pointer for the solution? Thanks in adv.
Joined: Aug 26, 2008
Can you post your WSDL, stack trace and steps you followed?
Joined: Jul 14, 2009
Sorry actually i was using bottom up approach.
The stack trace is: