Let your service to handle the overloading.  You do not want to put it at WSDL level.

-----Original Message-----
From: NICHOLLS T Ext OCISI [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 4:31 AM
To: [EMAIL PROTECTED]
Subject: How do I handle overloaded methods?


Hi Guys,

I have a web service with two methods with the same name and with the same number of 
parameters but with different parameter types. When running my client which uses Java 
proxy/stubs generated with wsdl2java (I used the ANT task) I get the exception:

org.xml.sax.SAXException: Bad types (class com.mypackage.MyClass -> class 
java.lang.String)

My methods both take one parameter. One takes the type com.mypackage.MyClass as 
parameter and the other takes java.lang.String.

Apparently the generated proxy/stubs do not distinguish between my two methods since 
they have the same name. How can I specify which of the methods I want to use?

Thanks in advance.

Regards,
Thomas Nicholls

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

Reply via email to