axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Overloading methods in AXIS vs. SOAP standard
Date Mon, 07 Jul 2003 13:55:19 GMT
Overloading is generally not recommended since it leaks details of the
service implementation.  You can build a service with overloaded
operations in Java since Java supports method overloading.  But, what
should this mean for a client that consumes your service from an
environment that doesn't?  

This is why the WS-I[1] has recommended explicitly against using
operation name overloading in R2304 [2] - even if your toolkit supports

Jim Murphy 
Mindreef, Inc.

[1] -

[2] - from [1]

5.4.3 Distinctive Operations
Operation name overloading in a wsdl:portType is disallowed by the

R2304 A wsdl:portType in a DESCRIPTION MUST have operations with
distinct values for their name attributes. 

Note that this requirement applies only to the wsdl:operations within a
given wsdl:portType. A wsdl:portType may have wsdl:operations with names
that are the same as those found in other wsdl:portTypes. 

-----Original Message-----
From: Jeffrey J Gaynor/jqhome [] 
Sent: Monday, July 07, 2003 9:32 AM
Subject: Overloading methods in AXIS vs. SOAP standard


I have a design question about AXIS. I know that AXIS allows for
methods like

public String fnord(String x);
public String[] fnord(String[] x);

and will create the right calls for them using WSDL. But, when invoking 
them, it will only find the second method. As a matter of fact, here is
bugzilla entry for this:

Now the question is this. The SOAP standard doesn't seem to allow this,
a colleague of mine found the following quote on the O'Reilly site:

"Web services don't allow method overloading. This is a limitation in
the SOAP  standard. It means you can't differentiate methods by their
arguments alone.  Instead, you'll need to create separately named
methods like GetCustomerByID() and GetCustomerByName()"

So here is the questions:

1. Is this overloading an AXIS-specific enhancement? 

2. If so, it does not work in 1.1, but will it later?

If 1. is the case, *please* give a source if possible, cause we're going
have to re-write an API if not...



View raw message