aspose file tools*
The moose likes Web Services and the fly likes SAAJ portable ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SAAJ portable ?" Watch "SAAJ portable ?" New topic
Author

SAAJ portable ?

Haroldo Nascimento
Ranch Hand

Joined: Aug 14, 2003
Posts: 79
Hi

I know that JAX-RPC is the tecnology portable. It use WSDL to permit that clients of the other platforms exchange message with WS EndPoint.

but the SAAJ does not use WSDL. Is possible other application (Perl, Microsft, ...) exchange message using only SAAJ. Eh possible use JAX-RPC and SAAJ together ?

What is the advantages and disadvantages of SAAJ and JAX_RPC ?

thanks
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Haroldo,

First, I'll have to ask you to add a last name to your display name -- our naming policy requires it.

Thanks.

Originally posted by Haroldo:
but the SAAJ does not use WSDL. Is possible other application (Perl, Microsft, ...) exchange message using only SAAJ. Eh possible use JAX-RPC and SAAJ together ?
In the end, both SAAJ and JAX-RPC APIs are used for sending SOAP messages over (usually) HTTP. You can use JAX-RPC to invoke service X and you can use SAAJ to invoke service X, but there's no point in trying to use both JAX-RPC and SAAJ to invoke service X. Also, because what goes over the wire is SOAP, it doesn't matter for a client written in Perl, C#, C++, Python, Java, etc. in which language or platform the service was implemented -- as long as it understands SOAP messages.

Originally posted by Haroldo:
What is the advantages and disadvantages of SAAJ and JAX_RPC ?
In short:
- JAX-RPC is easy to use (no need to worry about the actual SOAP message)
- SAAJ gives you more power (ability to tweak the actual SOAP message)


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Haroldo Nascimento
Ranch Hand

Joined: Aug 14, 2003
Posts: 79
Thanks Lasse,

I have more any doubts. I see in the many sites the follow example xml using the JAX-RPC: (This http://www.w3.org/2000/03/29-XML-protocol-matrix.html is a example of site)

<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value><i4>41</i4></value>
</param>
</params>
</methodCall>

In the specification of the project FlyByNight entreprise of SCEA part II use this specification of XML too.

My doubt is: The library of JAX-RPC understand this XML pattern or I have that implements a layer that parser this xml and call the RPC and in the response get the return of remote method and create the XML that contain the data.

How I would can use JAX-RPC send the XML above because the example of HelloWorld of the C:\jwsdp-1.4\jaxrpc\samples\ need that the client use the stub class to call the method stub.sayHelloBack("JAXRPC Sample"). I would like send the XML and not use the stub class.

thanks
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
As far as I know, JAX-RPC does not support XML-RPC. JAX-RPC supports SOAP which is not the same as XML-RPC. In other words, no, you can't invoke an XML-RPC service with JAX-RPC.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SAAJ portable ?