Return-Path: Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 48880 invoked from network); 3 Apr 2002 23:59:02 -0000 Received: from mtiwmhc23.worldnet.att.net (204.127.131.48) by daedalus.apache.org with SMTP; 3 Apr 2002 23:59:02 -0000 Received: from DELL850 ([12.86.7.23]) by mtiwmhc23.worldnet.att.net (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020403235908.TOX8815.mtiwmhc23.worldnet.att.net@DELL850> for ; Wed, 3 Apr 2002 23:59:08 +0000 Message-ID: <001201c1db6b$8d036c80$1707560c@DELL850> From: "Stan Jordan" To: Subject: Re: Document style service with two methods Date: Wed, 3 Apr 2002 16:58:18 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ramon... Yup, I got it to work with 2 methods. I am most grateful for your help. Thanks! Stan ----- Original Message ----- From: "Stan Jordan" To: Sent: Wednesday, April 03, 2002 8:06 AM Subject: Re: Document style service with two methods > Hi Ramon... > Thanks much for the info. I was thinking of putting this in the client: > call.setOperationName("methodA"); > But it sounds like you did not do this. Right? > Thanks again. > Stan > > ----- Original Message ----- > From: "Ramon Turnes" > To: > Sent: Wednesday, April 03, 2002 6:06 AM > Subject: RE: Document style service with two methods > > > > > > Hi to both, > > > > well, actually I had figured out how to do it by taking a look at > > the source code. Let's suppose this is my message service with > > two methods: > > > > public class MyService { > > Document methodA(Document xml) { > > ... > > } > > > > Document methodB(Document xml) { > > ... > > } > > } > > > > 1. In the WSDD deployment document you must put this: > > > > > > > > > > > > > > where is important that you put "*" to list your methods. > > Explicit listing of both methods does not work (I believe > > is a bug in Axis). > > > > 2. Your client application must send this within the > > SOAP-ENV:Body element: > > > > > > > > > > > > > > or > > > > > > > > > > > > > > > > You must notice that if you only had one method you > > would send this: > > > > > > > > > > Axis Message provider takes a look at the root tags within > > your document to figure out which method to be called. Whether > > this is the right way to do it is another issue. > > > > Ramon. > > > > > -----Original Message----- > > > From: Stan Jordan [mailto:skjordan@worldnet.att.net] > > > Sent: Wednesday, April 03, 2002 1:07 AM > > > To: axis-user@xml.apache.org > > > Subject: Re: Document style service with two methods > > > > > > > > > Ramon & Steve... > > > This is not quite the answer you want, but may send you in the right > > > direction. Take a look at this service: > > > > > > http://samples.gotdotnet.com/quickstart/aspplus/samples/servic > > > es/MathService > > > /VB/MathService.asmx > > > The service is style="document" and provides four methods: > > > float Add(float a, float b); > > > float Subtract(float a, float b); > > > float Multiply(float a, float b); > > > float Divide(float a, float b); > > > Do this: > > > Create wsdl file with your browser, create stubs, and compile > > > the stubs. > > > Now compile & execute the client shown below. Works fine! > > > By examining the stubs, maybe you will find what you are looking for. > > > Cheers. > > > Stan > > > -------------------------------- > > > //This is client for a service with style="document" > > > import org.tempuri.MathServiceLocator; > > > import org.tempuri.MathServiceSoap; > > > > > > public class Client { > > > public static void main(String [] args) throws Exception { > > > > > > MathServiceLocator service = new MathServiceLocator(); > > > MathServiceSoap port = service.getMathServiceSoap(); > > > > > > System.out.println(" add= " + port.add(1.1F, 2.5F)); > > > System.out.println("multiply= " + port.multiply(1.1F, 2.0F)); > > > System.out.println(" divide= " + port.divide(10.0F, 3.0F)); > > > } > > > } > > > > > > -------------------------------- > > > ----- Original Message ----- > > > From: "Steven Gollery" > > > To: > > > Sent: Tuesday, April 02, 2002 1:34 PM > > > Subject: RE: Document style service with two methods > > > > > > > > > > Ramon, > > > > > > > > I have the same problem -- I've been hoping that someone > > > with more Axis > > > > experience than I have would jump in and either tell us how > > > to do this > > > > or confirm that it can't be done for some reason. > > > > > > > > The only solution I've been able to come up with is one that you've > > > > probably already considered (and which I think is the same > > > way that the > > > > AdminClient works): have one service method, but put the real method > > > > name in the document itself (probably in the root tag). > > > Then the method > > > > implementation checks to see what operation the client > > > wants and calls > > > > that method itself. > > > > > > > > But this seems unsatisfactory to me. Hopefully the Axis > > > people can come > > > > up with a better approach. > > > > > > > > Steve Gollery > > > > > > > > Ramon Turnes wrote: > > > > > > > > >Hi, > > > > > > > > > >I would like to have a service using Document style with two > > > > >methods but it seems that this is not possible because the > > > > >message dispatcher for Document style services checks for > > > > >a method with the following signature: > > > > > > > > > > > > > > > Document MyMethod(MessageContext mc, Document xml) { > > > > > ..... > > > > >} > > > > > > > > > >and the method name is not taken into consideration for > > > > >deciding which method to call. But what if I want to have > > > > >two methods in my service, let's say a Registration method > > > > >and a Ordering method? Should I provide then two endpoints > > > > >for each of the methods (I saw an example in WSTK that does it). > > > > >Can I do this with Document style services or I need to use RPC? > > > > > > > > > >Thanks. > > > > > > > > > > > > > > > > > > > > > > > > >