W3C home > Mailing lists > Public > xml-dist-app@w3.org > April 2002

Issue 195: why not only specify the local name

From: Jacek Kopecky <jacek@systinet.com>
Date: Tue, 16 Apr 2002 13:59:17 +0200 (CEST)
To: xml-dist-app@w3.org
Message-ID: <Pine.LNX.4.44.0204161335280.1964-100000@mail.idoox.com>
 Hi all,
 I'd like to say here why I think the proposal as stated in the 
description of issue 195 [1] is not a good idea.
 If we specify only the local name, there will be two levels of
possible conflicts. Let's say we mandate that the local name of
the return value edge is 'result'.
 The first conflict: what if we want to have a parameter called 
result?
 Possible solution - the language binding can translate the name
to _result and add an underscore in front of any other parameter
name that starts with it. So "void foo(int result, int _other)"
would result in a message with parameters named _result and 
__other.
 The second conflict - if we have the contract specified in XML 
Schema (or other XML schema language as opposed to specifying the 
procedure signature), and we have two elements in the result 
struct:
 <m:fooResult xmlns:m="urn:foo">
   <a:result xmlns:a="urn:a"/>
   <b:result xmlns:b="urn:b"/>
 </m:fooResult>
 This can be achieved if a language binding uses namespaces 
instead of underscores.
 Possible solution - we can say that the struct can contain only 
one edge whose local name is 'result'.

 In effect, we'd be adding complexity in language bindins (in 
most languages a parameter can be named 'result') and unnecessary 
restrictions in the structs (going across all possible namespaces 
which we shouldn't be able to affect) *only* because we want to 
use an unsuitable language to describe SOAP RPC in the easy way. 
I'd rather use the language in a slightly more complex way than 
change SOAP here.

 A sketch of a possible solution for WSDL if we stick with the
fully qualified name rpc:result (for those who wonder):

 <message name="getStockQuoteResult">
    <part name="anything" element="tns:returnTypeElement"/>
 </message>

 <binding>
   <operation name="getStockQuote">
     ...
     <output message="tns:getStockQuoteResult">
       <soap12:returnValuePart name="anything"/>
     </output>
   </operation>
 </binding>

 And the returnValuePart would always be represented in the 
resulting SOAP message as rpc:result, no matter it's original 
name (tns:returnTypeElement).

 Best regards,


                   Jacek Kopecky

                   Senior Architect, Systinet (formerly Idoox)
                   http://www.systinet.com/


[1] http://www.w3.org/2000/xp/Group/xmlp-issues.html#x195
Received on Tuesday, 16 April 2002 07:59:21 GMT

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