Re: References in the default namespace

Arthur Ryman <[email protected]>
Newsgroups gmane.comp.web.services.description
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: [email protected]



Jacek Kopecky <[email protected]> 
Sent by: [email protected]
02/09/2007 03:42 AM

To
Jonathan Marsh <[email protected]>
cc
[email protected]
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
> 
> 
> 
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.