You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Yann Deydier <yd...@yahoo.fr> on 2002/03/12 16:22:18 UTC
Little bug in the example "CalcClient.java", and comparison with MS Soap Toolkit
Dear Axis team,
you're really doing great work with Axis.
During my tests, the calculator example (userguide/example2) did not work. The
result returned was always "null".
I found that the following line was missing :
call.setReturnType( XMLType.XSD_INT );
Then, it works.
The other way to make this example work is to remove the 2 parameters type
definition line :
call.addParameter( "op1", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN
);
call.addParameter( "op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN
);
Then, it works.
So I think there is a little error in your example.
Secondly, I just would like to show you the minimal codes to call this web
service, one using java-axis, and the other using Ms Soap Toolkit :
JAVA-AXIS:
Call call = (Call) (new Service()).createCall();
call.setTargetEndpointAddress( new
java.net.URL("http://localhost:8080/axis/Calculator.jws") );
Integer iret = (Integer) call.invoke("add", new Object[] { new Integer(55),
new Integer(66) } );
System.out.println("Got result : " + iret);
MS-SOAP-TOOLKIT
SET mySoap = CreateObject("MSSOAP.SOAPClient")
mySoap.mssoapinit "http://localhost:8080/axis/Calculator.jws?wsdl"
WScript.Echo mySoap.add(5, 66)
It is obviously much simpler using MS tools, don't you think so ?
I guess java-axis allows much more fonctionnalities than Ms Soap, and that was
JUST a remark.
Thank you for reading me,
Yann Deydier
Computer engineer,
Ausy
France.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com