axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Junaid.Bha...@mro.com
Subject Re: Query
Date Tue, 12 Aug 2003 22:20:31 GMT





I was just reading through the WS-I Basic Profile 1.0 and I guess this is
just the exact sort of thing that it prohibits when it says:

R2710: The operations in a wsdl:binding in a WSDL description must result
in wire signatures that are different from one another.
The profile defines the "wire signature" of an operation in a wsdl:binding
to be the fully qualified name of the child element
of the soap:Body of the SOAP input message it describes.
In the document-literal case, since a wrapper with the operation name is
not present, the message signatures must be correctly designed so that
they meet this requirement.

- Junaid




                                                                                         
                                             
                      "Anne Thomas                                                       
                                             
                      Manes"                   To:       "sood_303" <asood@ipolicynet.com>,
<axis-user@ws.apache.org>                  
                      <anne@manes.net>         cc:                                 
                                                   
                                               Subject:  Re: Query                       
                                             
                      08/12/2003 08:00                                                   
                                             
                      AM                                                                 
                                             
                      Please respond to                                                  
                                             
                      axis-user                                                          
                                             
                                                                                         
                                             
                                                                                         
                                             




Ashish,

I hope you don't mind, but I'm sending this response to the Axis community,
because I'm sure others will appreciate it.

You asked:
> Can more than two operations in WSDL refer to the same message? if
> yes then is there a way to map the message back to the operation? How
> we can map the message back to the operation?Will the behaviour
> differ in case rpc and document styles?

The WSDL specification explicitly allows the reuse of messages, so, yes,
two
operations may refer to the same message. But I would recommend that you do
so only when using the RPC style. A SOAP server is supposed to dispatch
requests based on the Qname of the child element of the <soapenv:body>.
When
you're using RPC, the RPC system automatically generates a unique Qname for
each operation -- the child element of the <soapenv:body> is the operation
name. When you're using Document style, the Qname of the child element of
the <soapenv:body> is the element named in the message <part> definition.
So
for example, for any operation that uses the following message definition
as
its input, the child element of <soapenv:body> will be <tns:foobar>

<message name="foo">
   <part name=body element="tns:foobar" />
</message>

So, if you have two operations that use the same message as input, your
SOAP
server can't distinguish between the two messages based on the Qname. In
this case you have to use some other mechanism to distinguish the messages,
such as the HTTP SOAPAction header. This mechanism works in SOAP 1.1, but
SOAPAction will be an optional feature in SOAP 1.2, so I suggest that you
not grow dependent on it.

Note that you would have the same problem if you use the same element
definition in two messages:

<message name="foo">
   <part name=body element="tns:foobar" />
</message>

<message name="bar">
   <part name=body element="tns:foobar" />
</message>

In this situation, if you use message "foo" in one operation and message
"bar" in a second operation, both opertions will produce a signature of
<tns:foobar>.

Therefore, I recommend that you define separate elements for each message
definition, although both elements may use the same type:

<element name="foo" type="tns:foobar"/>
<element name="bar" type="tns:foobar"/>
<complexType name="foobar>
   !--type definition
</complexType>

<message name="foo">
   <part name=body element="tns:foo" />
</message>

<message name="bar">
   <part name=body element="tns:bar" />
</message>

Best regards,
Anne

----- Original Message -----
From: "sood_303" <asood@ipolicynet.com>
To: <anne@manes.net>
Sent: Tuesday, August 12, 2003 5:01 AM
Subject: Query


> Hi,
>
> I read your repsonse to a question asked regarding WSDL. Well, the
> response was excellent and explained all the details of WSDL
> maginficently. It ecouraged me mail  a question to you in
> anticipation of similar response.
>
> I am also a newbie in this field.
> I am working on software that has to decode a SOAP message and map it
> to an operation. Assuming I have access to the WSDL file.
> Can more than two operations in WSDL refer to the same message? if
> yes then is there a way to map the message back to the operation? How
> we can map the message back to the operation?Will the behaviour
> differ in case rpc and document styles?
>
> Thanks
> Ashish
>





Mime
View raw message