Chris's Rants

Friday, January 14, 2005

More on WS-I Profiles

Stefan writes:
If my reading of the spec is correct, another workaround would be to separate the WSDL into its abstract part (schemas, messages, operations and portTypes) and into one or more concrete bindings. The abstract part would be BP 1.1 compliant, the concrete part would claim conformance to the Binding Profile (where applicable).
He is correct. You can place a conformance claim on the wsdl:portType to designate that the abstract portion of the WSDL is conformant with the profile. e.g.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" 

xmlns:tns="http://example.org/myservice"
xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
targetNamespace="http://example.org/myservice">
<wsdl:portType name="MyPortType">
<wsdl:documentation>
<wsi:Claim
conformsTo="http://ws-i.org/profiles/basic/1.1" />
</wsdl:documentation>
...
</wsdl:portType>
<wsdl:binding name="MyBinding" portType="MyPortType" >
...
</wsdl:binding>
<wsdl:service name="MyService" >
<wsdl:port name="MyPort" binding="tns:MyBinding" >
<soapbind:address
location="http://example.org/myservice/myport" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I should note that it isn't actually necessary to separate the abstract and concrete portions into separate physical documents. The conformance claims are scoped so you can have both conformant and non-conformant aspects of the same WSDL description document.

He continues:
The only downside I can see is that this way, it will not be possible to use a single wsdl:service with multiple wsdl:port elements. But that is something I’d be willing to accept.
Which I don't understand. You can make a claim of conformance on either the entire service, or to an individual wsdl:port within a service. Hence, a wsdl:service that had multiple wsdl:port children, some conformant and others not, would only annotate those wsdl:ports which are conformant. It should also be possible to annotate a wsdl:portType and the wsdl:port that references a conformant wsdl:binding and not annotate another wsdl:port that references a wsdl:binding to that same wsdl:portType that is not conformant (e.g. one with a SOAP binding and another with a JMS binding to the same portType).

Technorati Tags: , ,

0 Comments:

Post a Comment

<< Home