axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <jim.mur...@pobox.com>
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
it.

Regards,
Jim Murphy 
Mindreef, Inc.



[1] -
http://www.ws-i.org/Profiles/Basic/2003-05/BasicProfile-1.0-WGAD.htm

[2] - from [1]

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

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 [mailto:jjg@jqhome.net] 
Sent: Monday, July 07, 2003 9:32 AM
To: axis-user@ws.apache.org
Subject: Overloading methods in AXIS vs. SOAP standard


Hi!

I have a design question about AXIS. I know that AXIS allows for
overloaded 
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
a 
bugzilla entry for this:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16519

Now the question is this. The SOAP standard doesn't seem to allow this,
as 
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()"

http://www.ondotnet.com/pub/a/dotnet/2002/09/03/webservices.html
--------------

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
to 
have to re-write an API if not...

Thanks!

Jeff





Mime
View raw message