This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11790 - Mex: serialization of QName could be problematic
Summary: Mex: serialization of QName could be problematic
Status: CLOSED REMIND
Alias: None
Product: WS-Resource Access
Classification: Unclassified
Component: MetadataExchange (show other bugs)
Version: CR
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: notifications mailing list for WS Resource Access
QA Contact: notifications mailing list for WS Resource Access
URL:
Whiteboard:
Keywords: hasProposal
Depends on:
Blocks:
 
Reported: 2011-01-18 14:40 UTC by Doug Davis
Modified: 2011-09-13 21:27 UTC (History)
0 users

See Also:


Attachments
edited spec for review before we commit (360.00 KB, application/msword)
2011-02-16 14:00 UTC, Doug Davis
Details

Description Doug Davis 2011-01-18 14:40:23 UTC
MEX was changed so that instead of passing in a MEX-defined String for the Dialect URI we now pass in the QName of the metadata root element.  I think this was a good decision however I'm wondering about how it is serialized in the XML.  Right now its supposed to look like this: 
    <mex:Dialect Type="wsdl:definitions"  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" ...> 
and this works just fine - technically.  I'm worried about two things: 

1 - if the definition of the prefix used in the qname ("wsdl" in this case) is define elsewhere, say on the soap Envelope then when the XML processor and the SOAP processor are moving this mex:Dialect element around its possible that one of them might do something like "clone" it or pull it from the Envelope as a stand-alone element.  Normally cloning of an element will force the xml processor to make sure all used prefixes/namespaces of that element (and children) are copied into the clone.  However, the xml processor doesn't know about this "wsdl" prefix - so its very possible that if the xml declaration of it is above the element being cloned then it might be lost/unresolvable after the cloning. 

2 - if you look in ws-eventing and ws-enum there's this paragraph: 
-----
The namespace bindings are evaluated against any namespace declarations that are in scope where the XPath expression appears within the SOAP message. Note that the evaluation of expressions that rely on such context dependent bindings is fragile in the face of transformations that alter namespace prefixes. Such transformations might occur during the transmission, processing, storage, or retrieval of a request. Clients that wish to isolate expressions from the effects of any changes to the namespace prefixes in the containing SOAP message are advised to construct expressions in a manner that avoids the use of namespace prefixes. For example, use an expression such as "/a[namespace-uri()='http://www.example.com']" not "/ns1:a". 
------
I believe that the potential for an xml processor to change the prefix exists in the ws-mex case as well.  However, unlike the xpath case you can't get around it since there's no way to use a URI instead of a prefix in a xsd QName serialization. 

I'd like to discuss this to see if people think we need to address this.

Possible serialization options, if we do want to change it:
- <mex:Dialect Type="nsURI/localPart" ...  
- <mex:Dialect Type="{nsURI}localPart" ...
- <mex:Dialect TypeNS="nsURI" TypeName="localPart" ...
Comment 1 Robert Freund 2011-02-01 21:09:16 UTC
{} approach is directional consensus to be confirmed.
Comment 2 Doug Davis 2011-02-02 11:08:02 UTC
From Ashok:

Here is a simple type for QName Serialization

<simpleType name='QNameSerialization'>
  <restriction base='string'>
   <pattern value='{.*}.+'/>
  </restriction>
</simpleType>

The pattern says " { followed by zero or more characters, followed by } followed
by one or more characters".  This assumes that the namespace URI can be empty
but the local name cannot be empty.
Comment 3 Robert Freund 2011-02-15 17:56:09 UTC
resolved as proposed
Comment 4 Doug Davis 2011-02-16 14:00:20 UTC
Created attachment 959 [details]
edited spec for review before we commit