W3C home > Mailing lists > Public > www-ws@w3.org > February 2004

Re: Basic Profile

From: Christopher B Ferris <chrisfer@us.ibm.com>
Date: Sun, 8 Feb 2004 18:04:17 -0500
To: JRBoverhof@lbl.gov
Cc: Anne Thomas Manes <anne@manes.net>, www-ws@w3.org, www-ws-request@w3.org
Message-ID: <OF620307BD.CCB38B5C-ON85256E34.007AB2A8-85256E34.007EBB79@us.ibm.com>

Josh wrote on 02/08/2004 02:50:40 PM:

<snip/>
> 
> This doesn't sound like a good solution to me, I think there are at 
> least four better
> ways of addresing this issue:
> 1. make it illegal

Make what illegal?

> 2. use the binding to define the namespace
> 3. Use the WSDL targetNamespace
> 4. Use the type namespace
> 
> Would it be legal to use 'encoded' to specify no namespace for an xml 
> instance, and
> essentially define all of the elements in an instance w/o namespace?

Not if you're interested in BP conformance. The Basic Profile disallows
use of the WSDL encoded style.

> 
> Can I use an XML Schema w/o a targetNamespace in a WSDL document?

No. See R2105[1].

> 
> The question I'm driving at: Are rpc/literal wrappers the only exception 

> to a general
> rule that all elements in an instance are namespaced?

No.

First off, there has been an errata published against BP1.0 [2]. R2737 has
been amended to make it clear as to the WG's true intent (it was actually 
incorrectly worded):

        R2737 A MESSAGE described with an rpc-literal binding MUST 
namespace 
        qualify the descendents of part accessor elements for the 
parameters 
        and the return value, as defined by the schema in which the part 
        accessor types are defined.

Secondly, I think that you may be confusing the requirement that a schema 
component
be defined in a schema that has a target namespace with the value of the
[target namespace] information item for any given element in an instance 
document
conforming to that schema.

For instance, if I changed the schema definition in the types
element in the example used in the BP1.0 spec for R2737 as follows:

   <xsd:schema targetNamespace="http://example.org/foo/"
       xmlns:tns="http://example.org/foo/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       elementFormDefault="unqualified"
       attributeFormDefault="unqualified">
       <xsd:complexType name="fooType">
          <xsd:sequence>
                <xsd:element name="bar" type="xsd:string"/>
                <xsd:element name="baf" type="xsd:integer"/>
          </xsd:sequence>
       </xsd:complexType>
   </xsd:schema>

The corresponding SOAP message would be as follows:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:foo="http://example.org/foo/">
  <s:Header/>
    <s:Body>
      <m:BarOperation xmlns:m="http://example.org/bar/">
         <BarAccessor>
            <bar>String</bar>
            <baf>0</baf>
         </BarAccessor>
      </m:BarOperation>
    </s:Body>
</s:Envelope>

Note that the child elements of the BarAccessor part accessor element are
not namespace qualified as defined in the schema that defines the type.

> 
> thanks,
> -josh

[1] 
http://ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.htm#refinement28035272
[2] http://ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0-errata-1.htm

Cheers,

Christopher Ferris
STSM, Emerging e-business Industry Architecture
email: chrisfer@us.ibm.com
blog: http://webpages.charter.net/chrisfer/blog.html
phone: +1 508 377 9295
Received on Sunday, 8 February 2004 18:04:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 July 2007 12:25:45 GMT