You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by "@z@d" <az...@gmail.com> on 2007/11/05 07:21:54 UTC
Aynchronous call using AXIS 2.0
Hi,
code:
------------------------------
package calc;
public class Calculator {
double num1;
double num2;
public double add(double i,double j){
double sum = i + j;
return sum;
}
public double sub(double i,double j){
double diff = i - j;
return diff;
}
}
------------------------------
This is my java class which i have exposed as a webservice in axis 2.0. Now
i need help to write a client with asynchronous (using RPCServiceClient and
invokeNonBlocking) call to the webservice. ServiceEPR is:
http://localhost:7070/axis/services/Calculator
The services.xml for the service is:
code:
------------------------------
<?xml version="1.0" encoding="Cp1252"?>
<service name="Calculator">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</messageReceivers>
<parameter name="ServiceClass" locked="xsd:false">
calc.Calculator
</parameter>
</service>
------------------------------
Thank you,
Regards,
Azad Bajaj