ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Ws Wiki] Update of "Tuscany/TuscanyJava/SCA Java/ConversationWSBinding" by cr22rc
Date Tue, 28 Nov 2006 12:50:55 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by cr22rc:
http://wiki.apache.org/ws/Tuscany/TuscanyJava/SCA_Java/ConversationWSBinding

New page:
= Proposal for Conversation Web Services Binding =
The following is a proposed standard for a web services message exchange pattern to establish
a conversation ID between client and server for SCA conversational support.  

== Motivation ==
Other existing open web services standards don't cover or completely specify an exchange to
establish a conversation in a fully interoperable manor.  
 * WSA Specifies the form and semantics of an  Endpoint reference (EPR). It doesn't cover
how endpoint references are created or exchanged.
 * WSRF does not standardize how EPRs to stateful resources are created. In addition, it specifies
resource properties which go beyond SCA conversational requirements.


== Overview ==
The following proposes using a standard EPR in the SOAP header upon the first invocation of
an operation on an interface with a conversation scope to contain the conversation id.

== Example SCA Conversation EPR ==


{{{
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <S:Header> 
    <scaNS:ConversationReference xmlns:scaNS="http://www.osoa.org/xmlns/sca/1.0">
      <wsa:Address>http://someuri</wsa:Address>
      <wsa:ReferenceParameters>
        <scaNS:conversationID>xs:any*</scaNS:conversationID>
      </wsa:ReferenceParameters>
    </scaNS:ConversationReference>
   </S:Header>
  <S:Body>
  ....
  </S:Body>
</S:Envelope>
}}}

/scaNS:ConversationReference
  This element contained in the SOAP HEADER is recognised as the beggining of a new SCA conversation.
  It is of type http://www.w3.org/2005/08/addressing EndpointReferenceType
/scaNS:ConversationReference/wsa:Address  
  This element contained in the scaNS:ConversationReference element  specifies the [address]
property of the endpoint reference. 
/scaNS:ConversationReference/wsa:ReferenceParameters
  This element contained in the scaNS:ConversationReference element is identical to it use
in WS-A except its use is  REQUIRED.
/scaNS:ConversationReference/wsa:ReferenceParameters/scaNS:conversationID This REQUIRED element
contained in a wsa:ReferenceParameters element contains the XML representation of the conversationID.


All other elements MUST conform as specifed in WS-Addressing's wsa:EndpointReference.

Optionally, the response MAY contain in a SOAP HEADER element an EPR which is to be used for
subsequent operations in the conversation. If not present the Request EPR will be used.

== Example calculator exchange. Sum numbers, get result ==
{{{
@Remoteable
@Session("CONVERSATIONAL")
public interface Calculator{
  public void add( int op);
  public int getSum();
  @EndConversation
  public void off();
}
}}}
=== Add 1: ===
{{{
Request:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <S:Header> 
    <scaNS:ConversationReference xmlns:scaNS="http://www.osoa.org/xmlns/sca/1.0">
      <wsa:Address>http://calculator/sum</wsa:Address>
      <wsa:ReferenceParameters>
        <scaNS:conversationID>03c77215-4717-11d8-ac80-0090272ff725</scaNS:conversationID>
      </wsa:ReferenceParameters>
    </scaNS:ConversationReference>
  </S:Header>
  <S:Body>
    <calc:add  xmlns:calc="http://calculator/sum">1</calc:add>
  </S:Body>
</S:Envelope>

Response:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  <S:Body>
    <calc:addResponse xmlns:calc="http://calculator/sum"/>
  </S:Body>
</S:Envelope>

}}}
=== Add 2: ===
{{{
Request:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <S:Header> 
        <scaNS:conversationID>03c77215-4717-11d8-ac80-0090272ff725</scaNS:conversationID>
  </S:Header>
  <S:Body>
    <calc:add  xmlns:calc="http://calculator/sum">3</calc:add>
  </S:Body>
</S:Envelope>

Response:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  <S:Body>
    <calc:addResponse xmlns:calc="http://calculator/sum"/>
  </S:Body>
</S:Envelope>
}}}

=== Get sum: ===
{{{
Request:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <S:Header> 
        <scaNS:conversationID>03c77215-4717-11d8-ac80-0090272ff725</scaNS:conversationID>
  </S:Header>
  <S:Body>
    <calc:getSum  xmlns:calc="http://calculator/sum"/>
  </S:Body>
</S:Envelope>

Response:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  <S:Body>
    <calc:geSumtResponse xmlns:calc="http://calculator/sum">3</calc:geSumtResponse>
  </S:Body>
</S:Envelope>
}}}
=== Off: ===
{{{
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <S:Header> 
        <scaNS:conversationID>03c77215-4717-11d8-ac80-0090272ff725</scaNS:conversationID>
  </S:Header>
  <S:Body>
    <calc:off xmlns:calc="http://calculator/sum"/>
  </S:Body>
</S:Envelope>

Response:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
  <S:Body>
    <calc:offResponse xmlns:calc="http://calculator/sum" />
  </S:Body>
</S:Envelope>

}}}

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@ws.apache.org
For additional commands, e-mail: general-help@ws.apache.org


Mime
View raw message