开发者

Databinding in AXIS2

开发者 https://www.devze.com 2023-02-04 16:43 出处:网络
I have created a web service for the following method using AXIS 1.4 public class SoapTest { public String test(String param) {

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
0

精彩评论

暂无评论...
验证码 换一张
取 消