Java Reference
In-Depth Information
NOTE
The WSDL 1.1 specification (section 3.4) expressly forbids the use of the SOAPAction attribute
when using a transport layer other than HTTP. Also, it's worth noting that SOAPAction has been
made optional in WSDL 1.2 and 2.0.
The purpose of SOAPAction is to allow firewalls and other processing nodes on a message's
path to filter or help route messages. However, the WS-Addressing standard subsumes the
functionality offered by this header. WS-Addressing deals with routing information in a far
more robust fashion that SOAPAction does, and it does so native to the SOAP message itself
(rather than out of band by relying on the underlying transport layer).
NOTE
It is a good idea to specify a value for the soapAction if you are planning on having any .NET
WCF (Windows Communication Foundation) with your service using WS-Addressing. The WCF cli-
ent will generate the proper values based on your WSDL if it has a value other than the default empty
string.
Using BindingProvider
There are other ways of specifying the SOAP action as well. You can use the
javax.xml.ws.BindingProvider too, as follows:
//indicate to use soap action
((javax.xml.ws.BindingProvider)port).getRequestContext().put(
javax.xml.ws.BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
//Specify the soap action uri
((javax.xml.ws.BindingProvider)port).getRequestContext().put(
javax.xml.ws.BindingProvider.SOAPACTION_URI_PROPERTY,
"http://soacookbook/myService/myOp");
Search WWH ::




Custom Search