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?
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."
soapconnection.call (soapMessage, intermediate_url) and then soapconnection.call(soapMessage, ultimate_url).
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.