Hi, Everyone:

I was trying to call Axis web service example that come with the Axis
installation.

The web server is Websphere 5. I deployed samples\userguide\example3 which
is 'MyService' successfully.

Because when I call
http://myserverip:9080/WSP_web_server/axis/services/AdminService, it shows:

And now... Some Services
MyService (wsdl)
serviceMethod
AdminService (wsdl)
AdminService
MessageService (wsdl)
storeDisposition
Version (wsdl)
getVersion

But when I call the MyService from a standalone client just as the Axis user
guide shows:

        public static void main(String [] args) throws Exception{
                        Options options = new Options(args);

                        String endpointURL =
"http://myserverip:9080/WSP_web_server/axis/services/MyService";;
                        String textToSend;

                        args = options.getRemainingArgs();
                        if ((args == null) || (args.length < 1)) {
                                textToSend = "<nothing>";
                        } else {
                                textToSend = args[0];
                        }

                        Service  service = new Service();
                        Call     call    = (Call) service.createCall();

                        call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
                        call.setOperationName( new QName("MyService", "serviceMethod") 
);
                        call.addParameter( "arg1", XMLType.XSD_STRING, 
ParameterMode.IN);
                        call.setReturnType( 
org.apache.axis.encoding.XMLType.XSD_STRING );

                        String ret = (String) call.invoke( new Object[] { textToSend } 
);

                        System.out.println("You typed : " + ret);
        }

It shows the error:

AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (404)File not found
 faultActor:
 faultNode:
 faultDetail:
        {}string: return code:  404
Error 404: File not found: axis/services/MyService


(404)File not found
        at org.apache.axis.client.Call.invoke(Call.java:1703)
        at gov.wa.wsp.ws.MessageServiceTest.main(MessageServiceTest.java:107)
        at gov.wa.wsp.ws.MessageServiceTest.main(MessageServiceTest.java:113)
Exception in thread "main"

I tried with other services that I developed. All has the same error.

I did exactly the same thing Axis example ask me to. It just doesn't work as
Axis promised. Does anyone know why?


Sincerely,

Frank Shen
Project Manager & Senior Java Analyst
Lightyear Consulting Canada
Tel: 403-208-2455, Email: [EMAIL PROTECTED]
Fax: 403-208-2513


Reply via email to