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 Peter Haensgen <P....@intershop.de> on 2002/10/08 12:03:52 UTC

RE: more on possible bug - Wrong method gets invoked :-(

Hi James,

I'm experiencing the same problem. After upgrading my application from Beta
3 to the 1.0 release, I have trouble with accessing a service that has
methods with the same names, but different arguments:

    public ProductPrice[] getProductPrices(ProductRef ref)
    public ProductPrice[][] getProductPrices(ProductRef[] refs)

My client calls the first method, which works fine with Axis Beta 3 on the
server side. If I replace the axis.jar at the server by the 1.0 version, the
second method gets invoked instead on the server (without changing the
client application). Because it has a different return type than expected,
my client fails.

In my eyes this is an ugly Axis bug. However, I'm not sure if SOAP / WSDL /
JAXRPC / whatever supports method overloading at all... Maybe someone who is
more familiar with the specs can answer this?

Possible Workaround: find a different name for the second method.


regards,
Peter



> -----Original Message-----
> From: James Black [mailto:jblack@ieee.org]
> Sent: 27 September 2002 23:01
> To: axis-user@xml.apache.org
> Subject: re: more on possible bug
> 
> 
> Hello,
>   I have another overloaded method that is failing tests:
> lookupLocation(Location[] input)
> lookupLocation(Location input)
> 
> I call the second one, the first one is called, and I get a 
> failure.  It
> would appear that there are times when having an array or a 
> single bean
> as an input will confuse the server as to which method should 
> be called.
> 
> 
>