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

Re: References in the default namespace

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Fri, 9 Feb 2007 07:27:45 -0500
To: Jacek Kopecky <jacek.kopecky@deri.org>
Cc: Jonathan Marsh <jonathan@wso2.com>, www-ws-desc@w3.org, www-ws-desc-request@w3.org
Message-ID: <OF064BBAA4.162E21E9-ON8525727D.0042F69E-8525727D.004474E7@ca.ibm.com>
Jacek,

In the XML:  <wsdl:input element="OrderRequest" />, the element attribute 
has the value of a QName so since there is no explicit namespace prefix on 
OrderRequest, it's namespace is whatever has been set via an xmlns 
attribute. If no default namespace has been set then its value is "No 
Namespace".

However, whatever namespace is associated with OrderRequest, WSDL requires 
that one of two conditions hold:

1. The namespace was declared inline in the <types> section via 
<xs:schema>
2. The namespace was imported in the <types> section via <xs:import>

An <xs:import> MUST reference a namespace.

However, ever since we made the change requested by Ram to not require a 
target namespace on the <xs:schema> element, we now allow the <xs:schema> 
to have no targetnamespace. This allows OrderRequest to have no namespace. 
I raised this during an implementor's call as a possible unintended 
side-effect of Ram's change. 

I recall that the WG thought it was a bad idea to allow no namespace 
global element declarations in messages (and I assume faults). If that's 
the case, then I recommend we had the following component model assertion:

An InterfaceMessageReference MUST NOT refer to an XSD global element 
declaration that has no namespace.
An  InterfaceFault MUST NOT refer to an XSD global element declaration 
that has no namespace.

We could therefore have GED's that have no namespace in our component 
model (or maybe exclude then along the lines of Roberto's pruning 
recommendation), but we couldn't refer to them from WSDL components.

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
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



Jacek Kopecky <jacek.kopecky@deri.org> 
Sent by: www-ws-desc-request@w3.org
02/09/2007 03:42 AM

To
Jonathan Marsh <jonathan@wso2.com>
cc
www-ws-desc@w3.org
Subject
Re: References in the default namespace







Jonathan,
I'm not sure if the WSDL spec should say anything about this. XML Schema
refers to XML Namespaces where QName is defined as either prefixed or
unprefixed, and in XML the resolution of unprefixed is in the default
namespace, and prefixed goes according to the namespaces declared with
prefixes.

It sure should be legal in WSDL as well.
Jacek

On Thu, 2007-02-08 at 22:31 -0800, Jonathan Marsh wrote:
> Is this legal?
> 
> 
> 
>  <wsdl:interface name="Order"
> xmlns="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#">
> 
>     <wsdl:operation name="order"
> pattern="http://www.w3.org/2006/01/wsdl/in-out">
> 
>       <wsdl:input element="OrderRequest" />
> 
>       <wsdl:output element="OrderResponse" />
> 
>     </wsdl:operation>
> 
>   </wsdl:interface>
> 
> 
> 
> Or must I define a prefix for the QName?
> 
> 
> 
>   <wsdl:interface name="Order"
> xmlns:order="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#">
> 
>     <wsdl:operation name="order"
> pattern="http://www.w3.org/2006/01/wsdl/in-out">
> 
>       <wsdl:input element="order:OrderRequest" />
> 
>       <wsdl:output element="order:OrderResponse" />
> 
>     </wsdl:operation>
> 
>   </wsdl:interface>
> 
> 
> 
> The section on QName resolution doesn?t say that an NCName in element
> is interpreted as a local name in the default namespace.  Should it?
> Or is that obvious to everyone but me?  What does XML Schema do?
> 
> 
> 
> Jonathan Marsh - http://www.wso2.com -
> http://auburnmarshes.spaces.live.com
> 
> 
> 
> 
> 
> 
Received on Friday, 9 February 2007 12:28:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:46 GMT