I think we should avoid  overloaded operation in web service. I've ever wrote a soap 
engine in JavaScript. 
I can not call the overloaded operation in java webService for overloaded operation is 
not supported in JavaSctipt.

-----原始邮件-----
发件人: Jim Murphy [mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
发送时间: 2003年7月7日 21:55
收件人: [EMAIL PROTECTED]
主题: RE: Overloading methods in AXIS vs. SOAP standard


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:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2003 9:32 AM
To: [EMAIL PROTECTED]
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



Reply via email to