Hi, I am new to WebServices, I just downloaded axis2 from Apache.org , in the user guide it says : There are two methods to create services : 1)Writing Web Services Using Axis2's Primary APIs.
2)Writing Web Services by Code Generating Skeleton.
Which one is the best and the easy one ?
in the second method (Writing Web Services by Code Generating Skeleton) they are using the file Axis2SampleDocLit.wsdl , this file look little bit complicated, should we create a wsdl file like this one anytime we want to create a service.
Thank you, your help is appreciated.
Joined: Aug 19, 2005
Java-to-WSDL is the easiest to use but not recommended if you want interoperability unless your interface (and the types used in it) is extremely simple (everything has a straight forward JAX-WS Java-to-XML mapping as defined by the JAX-WS spec). Also Java-to-WSDL tends to lead to an unstable interface as the service evolves (i.e. simple interface changes may lead to a non-backward compatible client interface)
WSDL-to-Java is the best as you are directly designing the interface as your clients will see it. In terms of interface evolution you should be able to add optional elements later without necessarily breaking old clients.
Implementing against the Primary API would be the hardest and should be avoided unless you are implementing a non-standard, proprietary web service. If you can't do it with WSDL-to-Java, your clients probably won't be able to access your web service by simply "looking" at the WSDL either. However you may need access to the primary API if you want access to the Axis2 REST functionality (i.e. you are not building a SOAP Web Service).