axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upul Godage" <upulg....@gmail.com>
Subject Re: TestClient.java --"package org.apache.axis.client.call does not exist."
Date Sat, 06 Oct 2007 16:42:45 GMT
Hi,

Did you add all the jars in the Axis lib directory to the NetBeans project?

Upul

On 10/6/07, H.Z <zhshqzyc0002@yahoo.com> wrote:
>
> Hello,
>
> I am using Tomcat 5.0.25, Axis 1.4. NetBeans 5.5.
>
> I am trying an basic example Web Service client that will call the
> echoString method on the public Axis server at Apache.
>
> But I get an error.
> "package org.apache.axis.client.call does not exist."
>
> My code
>
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> import javax.xml.namespace.QName;
> public class TestClient
> {
>    public static void main(String [] args) {
>        try {
>            String endpoint =
>                     "http://nagoya.apache.org:5049/axis/services/echo";
>
>            Service  service = new Service();
>            Call     call    = (Call) service.createCall();
>            call.setTargetEndpointAddress( new java.net.URL(endpoint) );
>            call.setOperationName(new QName("http://soapinterop.org/",
> "echoString") );
>            // Call to addParameter/setReturnType as described in
> user-guide.html
>            //call.addParameter("testParam",
>            //                  org.apache.axis.Constants.XSD_STRING,
>            //                  javax.xml.rpc.ParameterMode.IN);
>            //call.setReturnType(org.apache.axis.Constants.XSD_STRING);
>            String ret = (String) call.invoke( new Object[] { "Hello!" } );
>            System.out.println("Sent 'Hello!', got '" + ret + "'");
>        } catch (Exception e) {
>            System.err.println(e.toString());
>        }
>    }
> }
>
>
> Thanks
>
>
>
> ------------------------------
> Don't let your dream ride pass you by. Make it a reality<http://us.rd.yahoo.com/evt=51200/*http://autos.yahoo.com/index.html;_ylc=X3oDMTFibjNlcHF0BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0b3MtZHJlYW1jYXI->with
Yahoo! Autos.
>
>

Mime
View raw message