This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i have created a simple web service and client using wsdltojava tool of Axis2 with available wsdl file . At the client side i just invoked the method of stub, that's it.. and it work fine.
But i don't understand how it identifies the endpoint?
How the connection is being created to server?
how actually marshaling is being done ??
please put some light on it.
That's the advantage of using WSDL2Java. In the WSDL the endpoint where the service is running on is defined. So if you generate a client from this WSDL the default configuration, usually, is that the endpoint from the WSDL is used as default. So that's how axis knows where to send the message to.
The mapping to and from XML is also generated from the WSDL. Depending on the configuration with Axis2 this will be either done using adb or jaxb. What this does it uses the annotated generated classes from the WSDL and uses that information to map from XML to Java and back again.
I don't know the dependencies axis has, but it probably uses the default Java URL connection to make the connection with the server. Since SOAP is just plain XML over HTTP there is usually no need for additional frameworks for creating this connection and invoking the endpoint.
Joined: Aug 24, 2012
thank you so much for your quick and useful reply ....