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 77412 invoked from network); 5 Jun 2002 14:56:45 -0000 Received: from server.tacc.utexas.edu (HELO tacc.utexas.edu) (129.116.206.14) by daedalus.apache.org with SMTP; 5 Jun 2002 14:56:45 -0000 Received: from localhost (ericrobe@localhost) by tacc.utexas.edu (8.11.6/8.11.0) with ESMTP id g55EukS15961 for ; Wed, 5 Jun 2002 09:56:46 -0500 Date: Wed, 5 Jun 2002 09:56:44 -0500 (CDT) From: Eric Roberts To: axis-user@xml.apache.org Subject: ArrayOutOfBoundsException Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am getting an ArrayOutOfBoundsException when I try to run the following code: (begin code here) package samples.userguide.example7; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.encoding.XMLType; import org.apache.axis.utils.Options; import javax.xml.rpc.ParameterMode; public class HelloClient { public static void main(String [] args) throws Exception { Options options = new Options(args); String endpoint = "http://localhost:" + options.getPort() + "/axis/HelloWorld.jws"; args = options.getRemainingArgs(); if (args == null || args.length != 1) { System.err.println("Usage: HelloClient arg1"); return; } String method = "getHello"; String s1 = new String(args[0]); Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(method); call.addParameter( "op1", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); Fails here--> String ret = (String) call.invoke(new Object [] {s1}); System.out.println(ret); } } After setting up some debug try/catch blocks around everything that involves an array I found that the problem lies in the line denoted "Fails here-->". HelloWorld.jws is in my jakarta/webapps/axis directory and looks like the following: public class HelloWorld { public String getHello(String name) { return "Hello"+ name; } } Any ideas?? -- _____________________________________________________________________ Eric Roberts ericrobe@tacc.utexas.edu Grid Computing Group Texas Advanced Computing Center University of Texas at Austin http://www.tacc.utexas.edu/~ericrobe _____________________________________________________________________