Return-Path: Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 4908 invoked by uid 500); 7 Feb 2003 00:43:08 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 4899 invoked from network); 7 Feb 2003 00:43:07 -0000 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: If two methods have different names but same parameters, the first one is always called. X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Thu, 6 Feb 2003 16:46:53 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: If two methods have different names but same parameters, the first one is always called. Thread-Index: AcLOFUHEbTG8tUDjTR6tmQMXwBzgbgAFyycw From: "Xia, Ge" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thank you very much for your reply. =20 I did an experiment - I changed my service to rpc style and both clients = worked! Unfortunately my service needs to be deployed as doc/lit style = since we don't want encodings and multi-refs in the xml messages. So my = questions are: 1. In this scenario, is it true that for doc/lit services I need to use = different element names and different messages(parts) in wsdl for each = operation, since clients cannot share the same message/part definition? = It also means I need to have different complexType definitions in the = schema? The result will be the new client will have two sets of objects = where one of them is not needed.=20 2. Any possibilities that Axis will support this in doc/lit services in = the future? Thanks, -Ge =20 -----Original Message----- From: Tom Jordahl [mailto:tomj@macromedia.com] Sent: Thursday, February 06, 2003 11:19 AM To: 'axis-user@ws.apache.org' Subject: RE: If two methods have different names but same parameters, the first one is always called. If the elements you are sending to a document style service have exactly = the same QName, then Axis will dispatch on this QName and only one = operation will be invoked. The operation name is not used in document/literal services. This is = what the rpc style is for - to wrap the arguments to an operation in the = operation name. If you have different element names, then you should be able to = configure the server .wsdd file with the element QName that should go to = each operation. i.e. myNS:newarg goes to op1 and myNS:oldarg goes to = op2. -- Tom Jordahl Macromedia Server Development -----Original Message----- From: Xia, Ge [mailto:gxia@iKnowMed.com]=20 Sent: Wednesday, February 05, 2003 12:54 PM To: axis-user@xml.apache.org Subject: RE: If two methods have different names but same parameters, = the first one is always called. Sorry I didn't make it clear. I have one definition for each element in = the schema, but in each element complex type, the last element = ("extraElement") is not in the old client's schema. In wsdl I am using = the same part name for both operations. Here is the schema: =09 And here is wsdl: =09 =09 =09 =09 =09 -----Original Message----- From: Glen Daniels [mailto:gdaniels@macromedia.com] Sent: Tuesday, February 04, 2003 8:57 PM To: 'axis-user@xml.apache.org' Subject: RE: If two methods have different names but same parameters, the first one is always called. 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:gxia@iKnowMed.com] > Sent: Tuesday, February 04, 2003 6:02 PM > To: axis-user@xml.apache.org > Subject: If two methods have different names but same parameters, the > first one is always called. >=20 >=20 > I am using axis beta 1.1. My old document style service has a=20 > method: outObject method1(inObject in); > I use WSDL2Java tool to generate the server side classes.=20 > Everything is working fine.=20 >=20 > Now I need to add an extra element to both inObject and=20 > outObject(in the type definition in wsdl) and create a new=20 > service method: outObject method2(inObject in); for a new=20 > client to use, but I don't want to break the client who has=20 > the old type definitions and who is still calling method1. >=20 > The two operations are defined in wsdl in this order: >=20 > > ..... > =20 >=20 > > ..... > =20 >=20 > The problem is when my new client calls method2(inObject) the=20 > server always invokes method1(inObject). If I put operation=20 > method2 before method1 in wsdl and re-generate the server=20 > classes, the new client works. But the old client breaks=20 > because it is calling method2 which contains an=20 > unrecognizable extra element.=20 >=20 > It seems that axis doesn't use method name to find an=20 > operation. It always finds the first operation whose=20 > parameters match the one passed in, in this case the first=20 > operation defined in the wsdl file. Is this a bug? If not,=20 > does anyone know what could be a workaround? >=20 > Thanks in advance. > =20 >=20 >=20 >=20