This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes SAAJ API does not allow intermediate nodes? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "SAAJ API does not allow intermediate nodes?" Watch "SAAJ API does not allow intermediate nodes?" New topic
Author

SAAJ API does not allow intermediate nodes?

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 737
From J2EE 5 tutorial , it says

All SOAP messages are sent and received over a connection. With the SAAJ API, the connection is represented by a SOAPConnection object, which goes from the sender directly to its destination. This kind of connection is called a point-to-point connection because it goes from one endpoint to another endpoint. Messages sent using the SAAJ API are called request-response messages. They are sent over a SOAPConnection object with the call method, which sends a message (a request) and then blocks until it receives the reply (a response).

J2EE 6 tutorial does not have any chapter about SAAJ API.

It says SOAPConnection only connect the sender directly to the destination. Does it mean we cannot use SOAPConnection if the message path has intermediate nodes?
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1661
    
  25

Himai Minh wrote:It says SOAPConnection only connect the sender directly to the destination. Does it mean we cannot use SOAPConnection if the message path has intermediate nodes?

No, you can still use it to connect to the intermediate node. From SOAP v1.1
"The SOAP intermediary is an application that is capable of both receiving and forwarding SOAP messages. Both intermediaries as well as the ultimate destination are identified by a URI."

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 737
So, that means we will need two connections from sender to intermediate_url and then from intermediate_url to ultimate receiver.
soapconnection.call (soapMessage, intermediate_url) and then soapconnection.call(soapMessage, ultimate_url).
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1661
    
  25

Yes, and you will use the SOAP actor attribute (SOAP v1.1) to indicate the ultimate destination.
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 737
But in SOAP 1.1, only the next actor is defined as "http://schemas.xmlsoap.org/soap/actor/next". The ultimate receiver in SOAP 1.1 is not defined.
But in SOAP 1.2, next role is defined at "http://www.w3.org/2003/05/soap-envelope/role/next", ultimate receiver is defined as "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver.

Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1661
    
  25

Yes, that is true you either provide the URI of the ultimate destination or you omit the SOAP actor attribute (to indicate that the recipient is the ultimate destination)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SAAJ API does not allow intermediate nodes?