OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-bindings message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: How to implement SCA callbacks using SOAP -- proposal for focusingdiscussion


Here is a proposal for implementing SCA callbacks using SOAP. This isn't totally new as there have been some discussion on this before. It consists of proposal, scenarios and how the proposal would work for the scenarios and how the messages would look on the wire.

Proposal:

1) Every request message that invokes the forward interface MAY contain the wsa:From SOAP header block. The wsa:From header block, if present, specifies the Callback EPR. If wsa:From header block is not present, then the wsa:ReplyTo, if present, specifies the Callback EPR. If neither wsa:From nor wsa:ReplyTo are present in the request message of the forward interface, the service MUST generate a SOAP Fault.

2) Every request message that invokes the forward interface MUST contain the wsa:MessageID SOAP header block. If a request message that invokes the forward interface does not contain the wsa:MessageID then the service must generate a SOAP Fault.

3) When the service wants to invoke the callback interface, it utilizes the Callback EPR obtained from the request message, as specified in step 1, that invoked the forward interface. Once the Callback EPR is selected, the service MUST follow the rules defined in WS-Addressing 1.0  section 3.3 to invoke operations on the callback interface. In addition, when the service invokes the callback interface, it MUST include a wsa:RelatesTo SOAP header block. The wsa:RelatesTo SOAP header block MUST have the relationship type value of "http://docs.oasis-open.org/opencsa/sca-bindings/callback" and the related message id is the wsa:MessageID of the message from which the Callback EPR was obtained.

Scenarios:

S: service with a bidirectional interface
R: reference connected to service S

The wire binding (in both directions) uses SOAP.

The forward interface consists of only one one-way operation: YouRIt()
The callback interface consists of only one one-way operation: NoYouRIt()

R invokes YouRIt(). Let's call this invocation R1 and it sets the callback address to RC1. S then calls NoYouRIt() twice: S1 and S2
R invokes YouRIt() again. Let's call this invocation R2 and it sets the callback address to RC1. S then calls NoYouRIt() once: S3
R invokes YouRIt(). Let's call this invocation R3 and it sets the callback address to RC2. S then calls NoYouRIt() twice: S4 and S5.

Wire messages:

R1:

<soap:Envelope ...>
  <soap:Header>
    <wsa:From>
      <wsa:Address>http://example.com/callback</wsa:Address>
      <wsa:ReferenceProperties>
        <myNS:SomeID>1</myNS:SomeID>
      </wsa:ReferenceProperties>

    </wsa:From>
    <wsa:MessageID>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6</wsa:messageID>
     ...
  </soap:Header>
  <soap:Body>
    ...
  </soap:Body>
</soap:Envelope>

S1, S2:

<soap:Envelope ...>
  <soap:Header>
    <wsa:To>http://example.com/callback</wsa:To>
    <myNS:SomeID>1</myNS:SomeID>
    <wsa:RelatesTo RelationshipType="http://docs.oasis-open.org/opencsa/sca-bindings/callback">
    urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
    </wsa:RelatesTo>
     ...
  </soap:Header>
  <soap:Body>
    ...
  </soap:Body>
</soap:Envelope>

R2:

<soap:Envelope ...>
  <soap:Header>
    <wsa:From>
      <wsa:Address>http://example.com/callback</wsa:Address>
      <wsa:ReferenceProperties>
        <myNS:SomeID>1</myNS:SomeID>
      </wsa:ReferenceProperties>
    </wsa:From>

    <wsa:MessageID>urn:uuid:f81d4fae-8dec-11d0-a765-00a0c91e6bf6</wsa:messageID>
     ...
  </soap:Header>
  <soap:Body>
    ...
  </soap:Body>
</soap:Envelope>

S3:

<soap:Envelope ...>
  <soap:Header>
    <wsa:To>http://example.com/callback</wsa:To>
    <myNS:SomeID>1</myNS:SomeID>

    <wsa:RelatesTo RelationshipType="http://docs.oasis-open.org/opencsa/sca-bindings/callback">
    urn:uuid:f81d4fae-8dec-11d0-a765-00a0c91e6bf6
    </wsa:RelatesTo>
     ...
  </soap:Header>
  <soap:Body>
    ...
  </soap:Body>
</soap:Envelope>

R3:

<soap:Envelope ...>
  <soap:Header>
    <wsa:From>
      <wsa:Address>http://example.com/callback-other</wsa:Address>
      <wsa:ReferenceProperties>
        <myNS:SomeID>2</myNS:SomeID>
      </wsa:ReferenceProperties>
    </wsa:From>

    <wsa:MessageID>urn:uuid:f81d4fae-9dec-11d0-a765-00a0c91e6bf6</wsa:messageID>
     ...
  </soap:Header>
  <soap:Body>
    ...
  </soap:Body>
</soap:Envelope>

S4, S5:

<soap:Envelope ...>
  <soap:Header>
    <wsa:To>http://example.com/callback-other</wsa:To>
    <myNS:SomeID>2</myNS:SomeID>

    <wsa:RelatesTo RelationshipType="http://docs.oasis-open.org/opencsa/sca-bindings/callback">
    urn:uuid:f81d4fae-9dec-11d0-a765-00a0c91e6bf6
    </wsa:RelatesTo>
     ...
  </soap:Header>
  <soap:Body>
    ...
  </soap:Body>
</soap:Envelope>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]