RE: Issue 51: Should soap:header@part be nmtokens? (was RE: ACTI ON: All wg members to review editorial issues by July 11)

Hi Jean-Jacques,

I totally agree that the purpose and process order of the header blocks and the body blocks are different by design. But the question is more about soap:body@parts v.s soap:header@part. Maybe an illustrative example will make it clear.

Say we define two messages for user info,

    <message name="msgLogin">
        <part name="userID" type="xsd:string"/>
        <part name="password" type="xsd:string"/>
        <part name="language" type="xsd:string"/>
    </message>

   <message name="msgProfile">
        <part name="userID" type="xsd:string"/>
        <part name="Country" type="xsd:string"/>
        <part name="Language" type="xsd:string"/>
        <part name="preferredCustomer" type="xsd:boolean"/>
        <part name="photo" type="some binary type"/>	
    </message>


Just fake a portType,

     <portType name="UserManagement">
        <operation name="login" >
           <input message="tns:msgLogin"/>
           <output message="xsd:string"/>
        </operation>

	...
    </portType>

Now say we want to bind this portType to SOAP, and just for illustration purpose, we want userID and password in soap:body, userID and Language in soap:header. Given the current WSDL construct, I may need to do the following: 
 
    <binding ...>
        <soap:binding style= ... transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="login">
           <soap:operation ...>
           <input>
               <soap:body parts = "userID password" ..../>
               
	   <soap:header message = "msgLogin" part = "userID" ..../>
               <soap:header message = "msgLogin" part = "Language" ..../>	
           
	</input>
	...
        </operation>>
    </binding>

My questions:

1. For the soap:header section, doesn't it make more sense to just use one line when all the parts are from the same message, symmetric to the case for soap:body?
           <soap:header message = "msgLogin" PARTS = "userID Language" ..../>

2.  In the above example, I may define a "registeration" operation, and I want its input contain some parts from msgLogin (say userID and password) and some parts from msgProfile (say country and Photo). How can I do that with the current portType construct? Note I don't want to combine this two
messages for this purpose since each of them may be reused by a couple of other operations. 

3. If 2 can't be done, does it make sense to allow soap:body contains info define in more than one messages? currently it's not possible to say,
               <soap:body message = "msLogin" parts = "userID password" ..../>
               <soap:body message = "msProfile" parts = "country photo" ..../>

	If this is a valid case, the @message for both body and header should be optional and default to the enclosing input/output message (WSDL1.1 grammar indicates that soap:header@message is required, bullet 1 above hopefully makes it obvious that optional makes more sense)

Regards,  Kevin
Technology Architecture Group, 
SAP Labs, Palo Alto
650-849-5167


-----Original Message-----
From: Jean-Jacques Moreau [mailto:moreau@crf.canon.fr]
Sent: Tuesday, July 09, 2002 2:28 AM
To: Liu, Kevin
Cc: 'Jonathan Marsh'; www-ws-desc@w3.org
Subject: Re: Issue 51: Should soap:header@part be nmtokens? (was RE:
ACTION: All wg members to review editorial issues by July 11)


I think the onus is on SOAP. SOAP 1.2 clearly differentiates between SOAP header blocks and the SOAP body.

A SOAP header block is typically additional data that helps the ultimate SOAP receiver process the SOAP body, or data targeted to a SOAP intermediary along the SOAP message path. Syntactically, a SOAP header is contained within the SOAP Header element.

The SOAP body carries the main intent of the SOAP message. It is (implicitely) targeted to the ultimate SOAP receiver. It has an application defined structure, not one defined by SOAP.

Also, there are differences in the way SOAP header blocks and the SOAP body are processed. In particular, the SOAP body is not processed unless all mandatory SOAP header blocks are recognized and understood by the SOAP processor.

So, overall, I think we just have to recognize they are enough syntactic and semantical differences, that we have to keep them separate in WSDL 1.2 as well. (And, BTW, I think it would be wrong to dissociate from the direction set by the XMLP WG, unless one really think they got it wrong, in which
case we should raise it as a
Last Call issue for SOAP 1.2.)

I hope this helps,

Jean-Jacques.

[1] http://www.w3.org/TR/2002/WD-soap12-part1-20020626/#procsoapmsgs

"Liu, Kevin" wrote:

> WSDL1.1 has different constructs for body and header, but doesn't provide any justification about the differences: [...]
> Given the fact that soap:body is just a particular kind of soap:header, it's not clear why wsdl should treat them so differently, in particular: [...]

Received on Tuesday, 9 July 2002 14:03:17 UTC