An interesting MEP
Martin Gudgin/Jeff Schlimmer
A data item service
- Consider a service the provides data items to consumers
- Such data items expire over time
- Service provides a port type for requesting an updated item
- Single operation
- Input message, output message (MEP2)
Example
<wsdl:definitions xmlns:wsdl='http://www.w3.org/@@@@/@@/wsdl'
targetNamespace='http://example.org/datasrv'
xmlns:tns='http://example.org/datasrv'
xmlns:xstns='http://example.org/types' >
<wsdl:types>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:xstns='http://example.org/types'
targetNamespace='http://example.org/types' >
<xs:element name='DataRequest' type='xstns:DataRequest' />
<xs:complexType name='DataRequest' >
<xs:sequence>
<xs:element name='ItemName' type='xs:QName' />
</xs:sequence>
</xs:complexType>
<xs:element name='DataItem' type='xstns:DataItem' />
<xs:complexType name='DataItem' >
<xs:sequence>
<xs:element name='Name' type='xs:QName' />
<xs:element name='Value' />
<xs:element name='Expires' type='xs:timeInstant??' />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name='DataRequest' >
<wsdl:part element='xstns:DataRequest' />
</wsdl:message>
<wsdl:message name='DataItem' >
<wsdl:part element='xstns:DataItem' />
</wsdl:message>
<wsdl:portType name='ProvideDataItems' >
<wsdl:operation name'ItemRequest'
mep='http://www.w3.org/@@@@/@@/MEP2' >
<wsdl:input message='tns:DataRequest' />
<wsdl:output message='tns:DataItem' />
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
Consider an HTTP binding
- Binding the operation to HTTP gives us
- Request-response
- Single channel
- Synchronous behaviour
Consider a multicast binding
- Binding to multicast
- Input message arrives in unicast
- Output message sent over broadcast
- Output message delivered to all clients
Observations
-
From the server perspective the operation is an input followed
by an output
- This is true for both bindings
- Server can support both bindings at the same time
- From the client perspective, things are somewhat different
Client view - HTTP
- Client sends output message
- Client receives input message
Client view - Multicast
- Client sends output message
- Client receives input message
- Client might also receive unsolicited input messages
- Due to DataRequest to server from other client