W3C home > Mailing lists > Public > xml-dist-app@w3.org > March 2003

RE: WSDL 1.2 drops use="encoded"

From: Don Box <dbox@microsoft.com>
Date: Wed, 5 Mar 2003 07:01:28 -0800
Message-ID: <57EF69AF56D92148984EDA3174082945040F9A04@RED-MSG-10.redmond.corp.microsoft.com>
To: "Marc Hadley" <Marc.Hadley@Sun.COM>, "Rich Salz" <rsalz@datapower.com>
Cc: "Jonathan Marsh" <jmarsh@microsoft.com>, <xml-dist-app@w3.org>

Marc nailed it IMO. A small set of types and/or conventions go a long way here. 


From: Marc Hadley [mailto:Marc.Hadley@Sun.COM]
Sent: Wed 3/5/2003 6:31 AM
To: Rich Salz
Cc: Jonathan Marsh; xml-dist-app@w3.org
Subject: Re: WSDL 1.2 drops use="encoded"

On Sunday, Mar 2, 2003, at 21:32 America/Boston, Rich Salz wrote:
> The definitive tone of Don's message made me go back and re-read the
> proposal.  I still think I'm right.  If only "literal" is supported,
> than
> the message schema must exactly describe the message: no multiref
> strings,
> etc., unless explicit encoded into the schema.  Is that correct?
Yes, you are indeed correct.

> If I have an operation
>     int foo(const char* a, const char* b)
> then using SOAP encoding, the body would look like
>    <SOAP:Body>
>     <foo xmlns="....">
>      <a href="#b"/>
>      <b>cloned string</b>
>    </foo>
> But the schema would look like foo as a complex element with
> sub-elements
> a and b as xsd:string.
Note that the SOAP encoding schema includes a set of simple types for
just this purpose, e.g.

   <xs:attributeGroup name="commonAttributes" >
            Attributes common to all elements that function as accessors or
         represent independent (multi-ref) values.  The ref attribute is
         intended to be used in a manner like CONREF.  That is, the
         content should be empty iff the ref attribute appears
        <xs:attribute ref="tns:id" />
        <xs:attribute ref="tns:ref" />
     <xs:anyAttribute namespace="##other" processContents="lax" />

   <xs:attribute name="id" type="xs:ID" />
   <xs:attribute name="ref" type="xs:IDREF" />

   <xs:element name="string" type="tns:string" />
   <xs:complexType name="string" >
       <xs:extension base="xs:string" >
         <xs:attributeGroup ref="tns:commonAttributes" />

So for simple types you can use the SOAP encoding variants. For complex
types you can re-use the attributeGroup. Not a perfect solution but
better than nothing.


Marc Hadley <marc.hadley@sun.com>
Web Technologies and Standards, Sun Microsystems.
Received on Wednesday, 5 March 2003 10:01:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:11:55 UTC