You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by rd...@mmm.com on 2004/06/06 23:14:23 UTC

issue with document style services and operations with identical arguments?




Folks,

I have been changing some Web Services to use document style, rather than
rpc and I have come accross an issue....

If I have two or more operations within a Web Service, that have the same
number, order and types of arguments....Axis seems to get confused.
By confused, it seems to invoke the first "Impl" method that matches the
number/order/types of arguments.

I did not encounter this with rpc (with the exact same WebServices)....just
document style.

The operations do not have the same names.
I have run into this with several different Web Services, so I assume it
not to be anything peculiar with them.
I ran into this with methods/operations that took no arguments....and
methods/operations that just took a single string.

If I change the document style Web Service operations, to take a "dummy"
argument of a unique type, everything works fine and the proper "Impl"
methods always get invoked.

Is this a limitation of document style web services or possibly with Axis?

Other than this issue, Axis has been fantastic!!!....

I am migrating Web Services from IONA's XML Bus to Axis.
These Web Services are actually Java /JacOrb clients communicating with
Orbix C++ Servers.
The response time of my C# Web Service clients (using Axis) are faster than
with XMLBus....a credit to Axis!!!
I have not automated the Java/CORBA code (as XMLBus does)....I am writing
it by hand....for now. ;)

Thanks in advance for your support!
Bob


RE: issue with document style services and operations with identical arguments?

Posted by Anne Thomas Manes <an...@manes.net>.
Per the WS-I Basic Profile [1], you must always give each operation a unique
message signature (which is the essentially the QName of the child element
of the soap:Body). As a best practice, I recommend that you create a unique
wrapper element for every doc/literal operation, where the name of the
wrapper element is the same as the operation name. This is a required
convention for "wrapped" style, but I recommend using it for non-wrapped
services also.

Here's the requirement from the WS-I BP:

5.6.7 Wire Signatures for Operations
An endpoint that supports multiple operations must unambiguously identify
the operation being invoked based on the input message that it receives.
This is only possible if all the operations specified in the wsdl:binding
associated with an endpoint have a unique wire signature. 

R2710 The operations in a wsdl:binding in a 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. For the case of an empty soap:Body this
name is an empty string. 

In the case of rpc-literal binding, the operation name is used as a wrapper
for the part accessors. 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.

[1] http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html

Anne

-----Original Message-----
From: rdeanna@mmm.com [mailto:rdeanna@mmm.com] 
Sent: Sunday, June 06, 2004 5:14 PM
To: axis-user@ws.apache.org
Subject: issue with document style services and operations with identical
arguments?





Folks,

I have been changing some Web Services to use document style, rather than
rpc and I have come accross an issue....

If I have two or more operations within a Web Service, that have the same
number, order and types of arguments....Axis seems to get confused.
By confused, it seems to invoke the first "Impl" method that matches the
number/order/types of arguments.

I did not encounter this with rpc (with the exact same WebServices)....just
document style.

The operations do not have the same names.
I have run into this with several different Web Services, so I assume it
not to be anything peculiar with them.
I ran into this with methods/operations that took no arguments....and
methods/operations that just took a single string.

If I change the document style Web Service operations, to take a "dummy"
argument of a unique type, everything works fine and the proper "Impl"
methods always get invoked.

Is this a limitation of document style web services or possibly with Axis?

Other than this issue, Axis has been fantastic!!!....

I am migrating Web Services from IONA's XML Bus to Axis.
These Web Services are actually Java /JacOrb clients communicating with
Orbix C++ Servers.
The response time of my C# Web Service clients (using Axis) are faster than
with XMLBus....a credit to Axis!!!
I have not automated the Java/CORBA code (as XMLBus does)....I am writing
it by hand....for now. ;)

Thanks in advance for your support!
Bob