wood burning stoves 2.0*
The moose likes Web Services and the fly likes difference between JAXRPC and SOAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "difference between JAXRPC and SOAP" Watch "difference between JAXRPC and SOAP" New topic
Author

difference between JAXRPC and SOAP

anand kumarblr
Greenhorn

Joined: Oct 27, 2006
Posts: 27

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
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
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
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.
anand kumarblr
Greenhorn

Joined: Oct 27, 2006
Posts: 27
Thanks for the reply. i get to know some Basics
 
Consider Paul's rocket mass heater.
 
subject: difference between JAXRPC and SOAP
 
Similar Threads
How to generate a correct WSDL for a service with overloaded methods ?
Is calling a method on stub a RPC style of webservice ?
SAAJ vs JAXP vs JAX-RPC
SOAP, JAX-RPC, SOAP-RPC
service interface in both web.xml and webservices.xml?