i can call a webservice by creating a SOAPEnvelope and sending it , webservice will take the SOAPEnvelope and gives back data in another SOAPEnvelope. (SOAP Method)
OR
i can call a webservice by creating a stubs out of WSDL and in webservice there will be some java class which will return me some data through VO. (JAX-RPC Method)
What i wanted to know is what is the difference between both.
i understand all message exchange happens in web service through SOAP,so what does jaxRPC does?
iam assuming JAX RPC internally uses SOAP to transfer XML messages, but only advantage of
JAX-RPC is that it will do the dirty work of populating our value objects from SOAP messages internally?
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
What you call the "SOAP method" probably means using the SAAJ API, which is a lower level API than JAX-RPC. In the end, both accomplish the same, but SAAJ -working on a lower level- is the harder to program against (more details to keep track of, easier to get it wrong).
Note that JAX-RPC is a deprecated API; if you're starting a new project you should be using the JAX-WS API instead.
anand kumarblr
Greenhorn
Joined: Oct 27, 2006
Posts: 27
posted
0
Thanks for the reply. and also for the suggestion for using "JAX-WS API ".
So JAX-RPC or JAX-WS internally uses SAAJ API for sending SOAP message?
if not SAAJ API it might use similar API to create SOAP message and send it ?
All i wanted to know is whatever the API it needs to use SOAP message for communicating?
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
So JAX-RPC or JAX-WS internally uses SAAJ API for sending SOAP message? if not SAAJ API it might use similar API to create SOAP message and send it ?
That depends on the SOAP stack. Axis, for example, has its own low-level SOAP API called AXIOM.
All i wanted to know is whatever the API it needs to use SOAP message for communicating?
Ultimately, all these APIs use SOAP; that's their purpose in life, after all.