WS-Transfer portType - Huh?

, Sep 21, 2004

Don Box on WS-Transfer:

Stage 3. Wow, I can model my entire universe using less verbs/operations than I have fingers on one hand.  Why would I ever author another WSDL portType?  

I was puzzled for a while; then I went to check the spec, which contains XSD like this:

  <xs:complexType name="AnyXmlOptionalType">
<xs:sequence>
<xs:any minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AnyXmlType">
<xs:sequence>
<xs:any minOccurs="1"/>
</xs:sequence>
</xs:complexType>

And here’s the WSDL for the Resource portType:

  <wsdl:portType name="Resource">
<wsdl:documentation>
This port type defines a resource that may be read, written, and deleted.
</wsdl:documentation>
<wsdl:operation name="Get">
<wsdl:input message="tns:Empty"/>
<wsdl:output message="tns:AnyXml"/>
</wsdl:operation>
<wsdl:operation name="Put">
<wsdl:input message="tns:AnyXml"/>
<wsdl:output message="tns:OptionalXml"/>
</wsdl:operation>
<wsdl:operation name="Delete">
<wsdl:input message="tns:Empty"/>
<wsdl:output message="tns:Empty"/>
</wsdl:operation>
</wsdl:portType>

I wasn’t even aware that there was a standard portType in that spec before - now I can’t help but wonder what, exactly, this WSDL buys me. I had hoped that in contrast to the default REST model, WS-Transfer would enhance the uniform API idea by restricting resource representations to those that conform to a meaningful schema …

I can’t help feeling that this is a significant departure of former mainstream WS-* thinking; essentially, it looks like we’re supposed to finally get around WSDL tools features with close ties to XML Schema by no longer really using them.

Which, IMO, is a Good Thing™.