Skip to main content

How WS-Addressing Action header is calculated ?

Posted by arungupta on August 3, 2006 at 8:58 AM PDT

W3C WS-Addressing
WSDL Binding
defines
the sequence to follow in order to calculate the value of Action header to be
sent in a client outbound SOAP message or expected in a server inbound SOAP
message. The sequence is explained below:

  1. If wsaw:Action is explicitly
    associated
    with wsdl:input message, then use that. For
    example,
<portType name="wsaTestPortType">
  <operation name="echo">
    <input message="service:wsaEchoInMessage" wsaw:Action="http://example.org/action/echoIn"/>
    <output message="service:wsaEchoOutMessage" wsaw:Action="http://example.org/action/echoOut"/>
  </operation>
</portType>

The expected (or generated) Action in this case is
"http://example.org/action/echoIn".

  1. If wsaw:Action is not specified on the wsdl:input
    message and non-empty soapAction is specified on wsdl:binding/wsdl:operation,
    then use that. For example,
<wsdl:binding name="wsaTestSoap11Binding" type="service:wsaTestPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="echo">
    <soap:operation style="document" soapAction="http://example.org/soapaction/echoIn"/>
    <input>
      <soap:body use="literal"/>
    </input>
    <output>
      <soap:body use="literal"/>
    </output>
  </operation>

The expected (or generated) Action in this case is "http://example.org/soapaction/echoIn".

  1. If wsaw:Action is not specified on the wsdl:input
    message and either soapAction is not specified or specified
    with empty string as it's value, then use the default
    action pattern
    . For example,
<definitions targetNamespace="http://example.org/wsaTestService" ...>
  ...
  <portType name="wsaTestPortType">
    <operation name="echo">
      <input message="service:wsaEchoInMessage"/>
      <output message="service:wsaEchoOutMessage"/>
    </operation>
  </portType>
  ...
  <binding name="..." type="tns:wsaTestPortType">
    <soap:binding style="document" transport="..."/>
    <operation name="echo">
      <soap:operation soapAction="">
      ...
    </operation>
  </binding>
</definitions>

In the binding above, soapAction's value is an empty string. The binding could alternatively be defined as (no soapAction):

<binding name="..." type="tns:wsaTestPortType">
  <soap:binding style="document" transport="...">
  <operation name="echo">
    <soap:operation>
    ...
  </operation>
</binding>

The expected (or generated) Action in either case is "http://example.org/wsaTestService/wsaTestPortType/echoRequest".

In all the above cases, WSIT-enabled
endpoint generates the correct Action header on the client outbound message and
expects the same on the server inbound.

Download WSIT and get
started
on standards compliant and interoperable Web services.

Technorati:
WSIT

Web-services

Related Topics >>