I have created a web service for the following method using AXIS 1.4
public class SoapTest {
public String test(String param) {
System.out.println("soap activity check "+param);
return param+" return from soap";
}
}
I am calling it using AXIS2 Wsdl2java utility. The client i am using is:
public static void main(String argv[]) {
try {
SoapTestServiceStub obj = new SoapTestServiceStub();
SoapTestServiceStub.Test obj2 = new SoapTestServiceStub.Test();
obj2.setParam("hello");
try {
SoapTestServiceStub.TestResponse res = obj.test(obj2);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者_运维技巧
On running the client SOP is working fine but then Getting the following error:
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement testReturn
at org.apache.axis2.AxisFault.makeFault
精彩评论