Issue 195: why not only specify the local name

 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 UTC