axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <jasn...@us.ibm.com>
Subject Re: doc/lit discussion addition
Date Tue, 16 Jul 2002 22:55:32 GMT
<rjs>
Should MyPart be Operation in the instance ?  Do we use
the operation name or the message name as the wrapper ?
</rjs>

AFAIK, in doc/lit Operation should never appear in the SOAP Envelope.

Given the message definition:

<message name="Test">
  <part name="P1" element="abc:Test1" />
  <part name="P2" element="abc:Test2" />
</message>

The doc/lit representation would be:

<s:Envelope>
  <s:Body>
    <abc:Test1 />
    <abc:Test2 />
  </s:Body>
</s:Envelope>

- James M Snell/Fresno/IBM
    Web services architecture and strategy
    Internet Emerging Technologies, IBM
    544.9035 TIE line
    559.587.1233 Office
    919.486.0077 Voice Mail
    jasnell@us.ibm.com
 Programming Web Services With SOAP, O'reilly & Associates, ISBN 
0596000952 

==
Have I not commanded you?  Be strong and courageous.  Do not be terrified, 

do not be discouraged, for the Lord your God will be with you wherever you 
go.  
- Joshua 1:9

Please respond to axis-dev@xml.apache.org 
To:     axis-dev@xml.apache.org
cc: 
Subject:        Re: doc/lit discussion addition



See my <rjs> comments


Rich 'Shirley' Scheuerle
IBM WebSphere & Axis Web Services Development
512-838-5115  (IBM TL 678-5115)




James M Snell/Fresno/IBM@IBMUS
07/16/2002 04:55 PM
Please respond to axis-dev


To:     axis-dev@xml.apache.org
cc:
Subject:        Re: doc/lit discussion addition



Russell said: "I think we have to say that if it's encoded (rpc/enc) then
it MUST be types.  If it's literal (doc/lit) then it can be types or
elements and, only if there is a single element, it may be wrapped.
Discussion?  Is my last paragraph acceptible?"

The WSDL message type definition doesn't say anything about whether or not

the SOAP binding is doc/lit or rpc/enc.  The message definition is an
abstract definition of the message type, not a description of the message
realization.

<rjs>
I agree, and the SEI should be based exclusively on the operation/message
type (not the binding).
Thus a decision needs to be made about what it means to use the element
attribute in a part.
And the correct answer is always to treat the referenced element as a
wrapped element when generating
the SEI regardless of doc/lit or rpc/enc.
</rjs>

Take the following case for instance:

<complexType name="MyPartType">
<sequence>
<element name="Test" type="xsd:string" />
</sequence>
</complexType>
<element name="MyPart" type="MyPartType" />

<message name="Test">
<part name="Part" type="xsd:anyType" />
</message>

<portType name="PortType">
<operation name="Operation">
<input message="Test" />
</operation>
</portType>

<binding name="Binding" type="PortType">
<soap:binding style="document" ... />
<operation name="Operation">
<soap:operation ... />
<input>
<soap:body use="literal" ... />
</input>
</operation>
</binding>

<s:Envelope>
<s:Body>
<MyPart>
<Test>Testing123</Test>
</MyPart>
</s:Body>
</s:Envelope>


<rjs>
Should MyPart be Operation in the instance ?  Do we use
the operation name or the message name as the wrapper ?
</rjs>

This is a perfectly valid use case of doc/lit.

Alternatively, the following example is an equally valid instance of
rpc/enc if the SOAP engine properly encodes the native application type as

the specified element value.

<message name="Test">
<part name="Part" element="MyPart" />
</message>

<portType name="PortType">
<operation name="Operation">
<input message="Test" />
</operation>
</portType>

<binding name="Binding" type="PortType">
<soap:binding style="rpc" ... />
<operation name="Operation">
<soap:operation ... />
<input>
<soap:body use="encoded" ... />
</input>
</operation>
</binding>

<s:Envelope>
<s:Body>
<MyPart>
<Test xsi:type="xsd:string">Testing123</Test>
</MyPart>
</s:Body>
</s:Envelope>

<rjs>
You are missing Operation in the instance.
</rjs>

In both of these cases, only the binding provides the information about
whether or not doc/lit or rpc/enc is to be used.  Axis should not invent
any additional (and artificial) rules on the use of WSDL's message type to

solve this problem.

<rjs>
I agree with your example; however it does not address how Axis generates
the SEI.  Axis needs to determine the signatures of the SEI using the
message type.  So if I changed your message and portType to:

<message name="Test">
<part name="Part" element="MyPart" />
</message>

<portType name="PortType">
<operation name="Operation">
<input message="Test" />
</operation>
</portType>

Axis should treat MyPart as a wrapped element and generate the signature:

public void operation(String Part);

The stub/serializers would be responsible for sending it over the wire in
the correct way.

If I change your message and portType to use type=:

<message name="Test">
<part name="Part" type="MyPartType" />
</message>

<portType name="PortType">
<operation name="Operation">
<input message="Test" />
</operation>
</portType>

The signature would be:

public void operation(MyPartType Part);

The stub/serializers should be responsible for sending it over the wire
the
correct way.


(In fact, the distinction between enc and lit is fairly artificial and
unnecessary in the WSDL description as the choice of whether or not to use

enc or lit should really be an implementation decision made by the service

provider or requester.  The WSDL SHOULD ONLY describe what the XML has to
look like on the wire, leaving it up to the developer and his/her SOAP
runtime to figure out how to produce that XML.  But, that's another
argument altogether that doesn't belong in this forum)

- James M Snell/Fresno/IBM
Web services architecture and strategy
Internet Emerging Technologies, IBM
544.9035 TIE line
559.587.1233 Office
919.486.0077 Voice Mail
jasnell@us.ibm.com
Programming Web Services With SOAP, O'reilly & Associates, ISBN
0596000952

==
Have I not commanded you?  Be strong and courageous.  Do not be terrified,


do not be discouraged, for the Lord your God will be with you wherever you

go.
- Joshua 1:9

Please respond to axis-dev@xml.apache.org
To:     axis-dev@xml.apache.org
cc:
Subject:        doc/lit discussion addition



Remember our doc/lit dicussion on the chat today?  We decided that

<message>
<part name="x" type="something"/>
</message>

means rpc/enc and

<message>
<part name="x" element="something"/>
</message>

means doc/lit.  Am I right so far?  (I'm ignoring doc/enc and rpc/lit.)
Did we say also that messages with types COULD NOT be doc/lit and messages

with elements COULD NOT be rpc/enc?  I don't recall.  If we did, we can't.

Take a look at WSDL section 5.1.  How are we supposed to deal with

<message>
<part name="body" element="tns:GetCompanyInfoResult"/>
<part name="docs" type="xsd:string"/>
<part name="logo" type="tns:ArrayOfBinary"/>
</message>

This is the MIME attachment example.  In the binding you discover that
"body" is a doc/lit, "docs is of MIME type "text/html", and "logo" is of
MIME type "image/gif" or "image/jpeg".

I think we have to say that if it's encoded (rpc/enc) then it MUST be
types.  If it's literal (doc/lit) then it can be types or elements and,
only if there is a single element, it may be wrapped.

Discussion?  Is my last paragraph acceptible?

Russell Butek
butek@us.ibm.com








Mime
View raw message