How WS-Addressing Action header is calculated ?

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
Comments:

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today