| Author |
how does stub work ?
|
laxmikant upadhyay
Greenhorn
Joined: Aug 24, 2012
Posts: 14
|
|
hi,
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.
|
 |
J Dirksen
Author
Greenhorn
Joined: Sep 04, 2012
Posts: 13
|
|
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.
|
 |
laxmikant upadhyay
Greenhorn
Joined: Aug 24, 2012
Posts: 14
|
|
hi Dirksen,
thank you so much for your quick and useful reply ....
|
 |
 |
|
|
subject: how does stub work ?
|
|
|