On the Operation Name Mapping requirement

Dear all,

Jim Webber and I are trying to get our heads around the Operation Name
Mapping (ONM) that exists in the current draft at the interface level
but will be moving to the service level, as I read in one of the
threads, in the next draft. 

We have been working on a very simple Noughts-and-Crosses (tic-tac-toc)
example for using SOAP and WSDL. The two players are effectively two
services exchanging messages. The description of each of the services
has to be symmetric, if we are to reason about their ability to
meaningfully exchange messages. This means that we have to describe both
the "initiating" and the "reacting" message exchanges. Here's what I
mean...

<definitions targetNamespace="nac:interfaces:initiator">
  <interface name="Player">
    <operation name="GameOver"
pattern="http://www.w3.org/2004/08/wsdl/out-in">
      <output element="nac:game-over" />
      <input element="nac:game-over" />
    </operation>
  </interface>
</definitions>

<definitions targetNamespace="nac:interfaces:reactor">
<interface name="Player">
  <operation name="GameOver"
pattern="http://www.w3.org/2004/08/wsdl/in-out">
    <input element="nac:game-over" />
    <output element="nac:game-over" />
  </operation>
</interface>

A Web Service that supports both these roles is described as:

<interface name="Player" extends="initiator:Player reactor:Player" />

What do the above interfaces mean? The first one tells us that the
service at some point will send a <game-over> message and will expect to
receive a corresponding <game-over> message as a result. The second
interface tells us that if a service receives a <game-over> message, it
will respond with the same message. It's just happens that the logic of
the services requires that the messages are the same. 

Since we are in a loosely coupled world, we don't really know which of
the two players will send the <game-over> message first, so we need to
support both behaviours at each service. This is absolutely fine since
the logic of the two services can cope with the scenario. "Oh... I just
received a 'game-over' message. The other player is telling me
something. I have to reply accordingly". Or, "Oh... I just received a
'game-over' message as a reply to the one I previously sent. That's the
other player's response". And "what if both endpoints send the same
message, at the same time?" you ask. Well, we use WS-Addressing to cope
with this situation ("ReplyTo" header).


However, the ONM requirement doesn't allow our services to be described
in this way since the wire format is the same for both GameOver
operations. The service logic requires us to send messages <game-over>
messages on the wire (and this works in our implementation) but WSDL 2.0
doesn't allow us to describe it. Should WSDL be so restrictive and
direct us towards a particular way of describing our services?

We can think of other business cases where it is the service logic that
determines the dispatching of a particular operation (based on contents,
protocol, etc.) and not the uniqueness of the wire format.

We'd be interested in the WG's comments.

Regards,
Savas & Jim

Received on Monday, 4 October 2004 11:51:30 UTC