Have a look at this thread. http://marc.theaimsgroup.com/?l=axis-user&m=101966931316371&w=2 Sylvain.
-----Original Message----- From: Oliver Suciu [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 8:46 PM To: [EMAIL PROTECTED] Subject: Re: Polymorphism support with Web Services? You mean method overloading. I think, in general, this should work; it may well be a bug in Axis. -- Oliver Jim Hazen wrote: > > I have a simple class (listed below). I would expect it to be a trivial > case to determine which method to call. After all the signature is > nothing alike (either type wise nor number of args wise). > > Axis Beta 2 is able to generate WSDL for this class without error. > However the stubs generated by WSDL2Java are broken. Is this a bug in > WSDL2Java or an inherent problem with Web Services? > > -Jim > > ---------- Java class > > public class Calculator > { > public Calculator(){} > > public int calculate(int a, int b){ return a+b;} > public int calculate(String s){return s.length();} > } > > ---------- Generated interface > > /** > * Calculator.java > * > * This file was auto-generated from WSDL > * by the Apache Axis Wsdl2java emitter. > */ > > package DefaultNamespace; > > public interface Calculator extends java.rmi.Remote { > public int calculate(java.lang.String s) throws > java.rmi.RemoteException; > public int calculate(java.lang.String s) throws > java.rmi.RemoteException; > } This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
