WS-Transfer != BP1.x conformant
Oops! Apparently, the WS-Transfer "Get" operation is not WS-I Basic Profile 1.x conformant.
The WSDL definition for the GET operation is defined as follows:
The WS-I Basic Profile 1.1 contains the following requirements:
I actually think that a more appropriate approach to handling WS-Transfer's "Get" would be to specify the output message as you would any doc-literal operation and merely annotate the operation with the appropriate wsa:Action attribute values. Thus, the consumer of the WSDL could determine what to expect in response to a "Get" while at the same time, implementations of the "Get" operation could use it to retrieve arbitrary content as was intended.
e.g.
The WSDL definition for the GET operation is defined as follows:
<wsdl:definitions ...>Note that the message part "data" uses the 'type' attribute and binds the tns:AnyXmlType, which is a complexType in the WS-Transfer schema.
...
<wsdl:message name="Empty"/>
<wsdl:message name="AnyXml">
<wsdl:part name="data" type="tns:AnyXmlType"/>
</wsdl:message>
...
<wsdl:portType name="Resource">
...
<wsdl:operation name="Get">
<wsdl:input message="tns:Empty"/>
<wsdl:output message="tns:AnyXml"/>
</wsdl:operation>
...
</wsdl:portType>
...
</wsdl:definitions>
The WS-I Basic Profile 1.1 contains the following requirements:
R2204 A document-literal binding in a DESCRIPTION MUST refer, in each of its soapbind:body element(s), only to wsdl:part element(s) that have been defined using the element attribute.Thus, one must conclude that the only possible binding for the "Get" operation would be an rpc-literal binding, and the response message must have a wrapper element with a local name of "GetResponse". However, the example in the spec for the GetResponse message is as follows:
R2207 A wsdl:message in a DESCRIPTION MAY contain wsdl:parts that use the elements attribute provided those wsdl:parts are not referred to by a soapbind:body in an rpc-literal binding.
R2729 An ENVELOPE described with an rpc-literal binding that is a response MUST have a wrapper element whose name is the corresponding wsdl:operation name suffixed with the string "Response".
<s:Envelope ...>The response message should actually be:
<s:Header ...>
<wsa:Action>
http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse
</wsa:Action>
<wsa:RelatesTo>xs:anyURI</wsa:RelatesTo>
<wsa:To>xs:anyURI</wsa:To>
...
</s:Header>
<s:Body ...>
xs:any
</s:Body>
</s:Envelope>
<s:Envelope ...>My guess is that this is not what the authors intended (since Microsoft doesn't support rpc-literal WSDL bindings). In fact, there is no way to describe in WSDL1.1 a doc-literal operation that has an input or output message with unspecified content.
<s:Header ...>
<wsa:Action>
http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse
</wsa:Action>
<wsa:RelatesTo>xs:anyURI</wsa:RelatesTo>
<wsa:To>xs:anyURI</wsa:To>
...
</s:Header>
<s:Body ...>
<wxf:GetResponse xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer">
xs:any
</wxf:GetResponse>
</s:Body>
</s:Envelope>
I actually think that a more appropriate approach to handling WS-Transfer's "Get" would be to specify the output message as you would any doc-literal operation and merely annotate the operation with the appropriate wsa:Action attribute values. Thus, the consumer of the WSDL could determine what to expect in response to a "Get" while at the same time, implementations of the "Get" operation could use it to retrieve arbitrary content as was intended.
e.g.
<wsdl:definitions ...>
...
<wsdl:message name="Empty"/>
<wsdl:message name="MyMessage">
<wsdl:part name="data" element="tns:MyElement"/>
</wsdl:message>
...
<wsdl:portType name="MyPortType">
...
<wsdl:operation name="Get">
<wsdl:input message="tns:Empty"
wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"/>
<wsdl:output message="tns:MyMessage"
wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse"/>
</wsdl:operation>
...
</wsdl:portType>
...
</wsdl:definitions>
1 Comments:
I agree that you have to specify the output message for the operation to be understood properly.
Selena
Webmaster at Ab Circle Pro
By Selena, at April 04, 2011 6:42 AM
Post a Comment
<< Home