Hi!
I am doing some experiments with axis2 for university. I think I am very
confused now about the "best practices" in developing an axis2 webservice.
I understand the point in contract-first scenario. Sure I want to have
full control over my exposed wsdl and no "1 character changed, every
user needs to update whole clientcode".
Now the situation is: I have a fully running java+hibernate "console"
backend application and want to expose some of its methods as a
webservice. The application is only a "code library" and the methods
need to be executed.
I am thinking of writing a "Webservice layer". One class that includes
all methods my webservice should have. This methods should call my
existing backend code.
==============
example:
import backend.Calculator;
public class NewWebService {
public int webMethod1 (int a, int b) {
Calculator calc = new Calculator();
return calc.multiply(a,b);
}
public int webMethod2...
}
==============
I wanted to generate a wsdl with all methods and then generating server
code by wsdl2java.
My application needs to export about 150 methods to web.
To test this I used an existing wsdl from my provider. I already wrote a
PHP soap client for this wsdl. It was very handy and no problem at all
to use this.
http://www.ovh.com/soapi/soapi-dlw-1.7.wsdl
When I am trying to generate servercode with wsdl2java for this wsdl it
generates about 35 megabytes and thousands of complicated files.
I think that is not what I want to use if I plan to release my
webservice within the next 30 years.
Do you have any suggestions for me? I thought exposing a set of methods
of existing code is not very uncommon.
Many Thanks,
Tom