Return-Path: Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 85108 invoked by uid 500); 30 Apr 2003 04:42:38 -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 85098 invoked from network); 30 Apr 2003 04:42:37 -0000 From: Bill Lear MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16047.21595.756155.423224@lisa.zopyra.com> Date: Tue, 29 Apr 2003 23:43:07 -0500 To: axis-user@ws.apache.org Subject: Re: Question about WSDL2Java generated code In-Reply-To: References: X-Mailer: VM 6.97 under Emacs 21.1.1 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wednesday, April 30, 2003 at 01:44:15 (+0000) dumdum 420 writes: >I will take a guess at this ... since I also started my webservice >experience with the Fibonacci example ... but was not as inovative ... > >FibonacciSoapBindingImpl is not a good apporach for you to test your client. >Basically go ahead and install your service in the AxisEngine by using the >AdminClient class. And then regenerate your client code without the -s >option and instead of giving the location of .wsdl now since it is up and >running service give the URL ?wsdl and then generate the stubs. > >Then basically go ahead and create your client by accessing the server code >using the stub and you will be all fine ... > >If still I am not clear tell me and I think I can skim you some client code >... I think I've got it: % cat FibonacciTester.java package fibonacci; public class FibonacciTester { public static void main(String [] args) throws Exception { fibonacci.ws.FibonacciService service = new fibonacci.ws.FibonacciServiceLocator(); fibonacci.ws.Fibonacci fib = service.getfibonacci(); fibonacci.ws.FibonacciRequest request = new fibonacci.ws.FibonacciRequest(); request.setStart(10); request.setStop(12); try { fibonacci.ws.FibonacciReply reply = fib.calculateFibonacci(request); int[] a = reply.getResults(); for (int i = 0; i < a.length; ++i) { System.out.println("fib(" + (i + 10) + ") = " + a[i]); } } catch (java.rmi.RemoteException e) { System.err.println("Error: " + e); } } } % java fibonacci.FibonacciTester fib(10) = 55 fib(11) = 89 fib(12) = 144 Very cool. Thanks. Bill