What do your types/parts look like? You can't have multiple definitions for the same element in schema, so I'm not quite sure how you'd express what you're talking about (i.e. one method which takes the "old" version and another which takes the "new").
--Glen > -----Original Message----- > From: Xia, Ge [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 04, 2003 6:02 PM > To: [EMAIL PROTECTED] > Subject: If two methods have different names but same parameters, the > first one is always called. > > > I am using axis beta 1.1. My old document style service has a > method: outObject method1(inObject in); > I use WSDL2Java tool to generate the server side classes. > Everything is working fine. > > Now I need to add an extra element to both inObject and > outObject(in the type definition in wsdl) and create a new > service method: outObject method2(inObject in); for a new > client to use, but I don't want to break the client who has > the old type definitions and who is still calling method1. > > The two operations are defined in wsdl in this order: > > <wsdl:operation name="method1"> > ..... > </wsdl:operation> > > <wsdl:operation name="method2"> > ..... > </wsdl:operation> > > The problem is when my new client calls method2(inObject) the > server always invokes method1(inObject). If I put operation > method2 before method1 in wsdl and re-generate the server > classes, the new client works. But the old client breaks > because it is calling method2 which contains an > unrecognizable extra element. > > It seems that axis doesn't use method name to find an > operation. It always finds the first operation whose > parameters match the one passed in, in this case the first > operation defined in the wsdl file. Is this a bug? If not, > does anyone know what could be a workaround? > > Thanks in advance. > > > >
