File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes use JAX-RPC or SAAJ service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "use JAX-RPC or SAAJ service?" Watch "use JAX-RPC or SAAJ service?" New topic
Author

use JAX-RPC or SAAJ service?

Hongqing Lu
Greenhorn

Joined: Jan 14, 2004
Posts: 13
As far as I know we can set up web service with JAX-PRC or SAAJ.
It seems that SAAJ is simpler than JAX-RPC for me, because it don't need to use WSDL.
Is there any difference between them? How to choose between them?
Please help!
Thanks in advance!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I would consider JAX-RPC easier than SAAJ because JAX-RPC has a higher abstraction level. SAAJ is about constructing SOAP message by hand while JAX-RPC is closer to "pure" objects. I'm not quite sure why you're worried about having to use WSDL? The WSDL document is exactly what makes web services development a breeze -- because you can generate the client and service code automatically. Besides, if you use SAAJ, you'll need to examine the WSDL to figure out what kind of message the service expects to receive...
I'd suggest using The Java Web Services Tutorial as a first step (you can probably skip most chapters as they're not directly related to web services).


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Also, you do not have to write WSDL by hand. Using tools like Java2WSDL, you simply code a JAX-RPC Service Endpoint Interface (just a Java interface, that's all) and it will generate the WSDL for you...
Because of this I'd consider JAX-RPC to be lightyears simpler than SAAJ...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: use JAX-RPC or SAAJ service?