File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

use JAX-RPC or SAAJ service?

 
Hongqing Lu
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic