- From: Jonathan Marsh <jmarsh@microsoft.com>
- Date: Thu, 9 Jun 2005 14:04:19 -0700
- To: "Arthur Ryman" <ryman@ca.ibm.com>
- Cc: <public-ws-desc-comments@w3.org>
- Message-ID: <7DA77BF2392448449D094BCEF67569A507D841B8@RED-MSG-30.redmond.corp.microsoft.com>
Thank you for your comment, which we tracked as LC117 [1]. The WG resolved to remove the Service Reference section in the core, to define wsdlx:interface and wsdlx:binding extensions in the Core, to be used as schema annotations, illustrate the use of these attributes in the Primer with URIs, to make @name required on Service and Endpoint types in the schema, and to coordinate with WS-A in illustrating support on wsa:EndpointReferences. If this resolution is unacceptable, please let us know within two weeks. [1] http://www.w3.org/2002/ws/desc/4/lc-issues/issues.html#LC117 ________________________________ From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On Behalf Of Arthur Ryman Sent: Monday, March 28, 2005 1:42 PM To: www-ws-desc@w3.org Subject: Problem with Service References: elementFormDefault="qualified" prevents restriction In the process of writing the Primer section on Service References, I have found a problem in the solution we adopted. The context of this topic is that some services may reference to other services, and we were defining a way that WSDL could be used to describe the interface and binding of the service that was being refered to. Recall that the we decided to go with Roberto's counter-proposal [1] which was based on the idea of using XSD to restrict wsdl:ServiceType and wsdl:Endpoint to have fixed values for @interface and @binding, and to transmit service references using the restricted wsd:ServiceType. If you just want to say that a message contains a reference to another service and you don't want to contrains the interface or binding, then you directly re-use the wsdl:ServiceType in the message. If you want to describe the interface of the service, then you create a new type that restricts the value of the @interface attribute to have a fixed value which is the QName of the interface. This works, e.g. If you also want to describe the binding of the service, then you create a new type that restricts the value of the @binding attribute of wsdl:EndpointType. You can do that, but there is no way you can actually use this type to restrict the <wsdl:endpoint> element. Here is a sample. <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://greath.example.com/2004/schemas/reservationDetai ls" xmlns:tns="http://greath.example.com/2004/schemas/reservationDetails" xmlns:wdetails="http://greath.example.com/2004/services/reservationDetai ls" xmlns:wsdl="http://www.w3.org/2004/08/wsdl"> <import namespace="http://www.w3.org/2004/08/wsdl" schemaLocation="wsdl20-1.xsd" /> <complexType name="ReservationDetailsEndpointType"> <complexContent> <restriction base="wsdl:EndpointType"> <attribute name="binding" type="QName" use="required" fixed="wdetails:reservationDetailsSOAPBinding" /> </restriction> </complexContent> </complexType> <complexType name="ReservationDetailsServiceType"> <complexContent> <restriction base="wsdl:ServiceType"> <sequence> <element name="endpoint" type="tns:ReservationDetailsEndpointType" /> </sequence> <attribute name="interface" type="QName" use="required" fixed="wdetails:reservationDetailsInterface" /> </restriction> </complexContent> </complexType> </schema> The problem is that within the <restriction> of wsdl:ServiceType, the <element name="endpoint" ...> refers the QName tns:endpoint, not wsdl:endpoint because we use elementFormDefault="qualified". This is actually a valid restriction since the content model of wsdl:ServiceType allows elements from other namespaces. However, this does not restrict the wsdl:endpoint element to have the fixed binding value. FYI, here is a chunk of a valid instance document according to this restricted service type. <reservation> <details:confirmationNumber>HSG635</details:confirmationNumber> <details:checkInDate>2005-06-27</details:checkInDate> <details:checkOutDate>2005-06-28</details:checkOutDate> <details:reservationDetailsService interface="wdetails:reservationDetailsInterface"> <details:endpoint name="SOAP" binding="wdetails:reservationDetailsSOAPBinding" address="http://greath.example.com/2004/reservation/HSG635"/> </details:reservationDetailsService> </reservation> There is a fix however. The reason that we were able to restrict the attribute values is that they are unqualified. Therefore, if we changed our WSDL schema to use elementFormDefault="unqualified", and we ensured that <endpoint> was a local element, then we could restrict it. However, for consistency, we should probably also make the other nested elements unqualified, i.e. just keep the top-level elements (<interface>, <binding>, <service>, etc.) qualified. We can still have named complex types for all the elements though. Arthur Ryman, Rational Desktop Tools Development phone: +1-905-413-3077, TL 969-3077 assistant: +1-905-413-2411, TL 969-2411 fax: +1-905-413-4920, TL 969-4920 mobile: +1-416-939-5063, text: 4169395063@fido.ca intranet: http://labweb.torolab.ibm.com/DRY6/
Received on Thursday, 9 June 2005 21:04:44 UTC