views:

291

answers:

2

I am trying to generate stub using wsdl2java.bat, my wsdl consists of two bindings. I see that wsdl2bat creates interface for operations in the first binding but does not generate anything for operations in the seconds binding. wsdl2java.bat -uri http://... -o client -d adb -s -u.

For example the code should look like this

try {
     //Create the stub by passing the AXIS_HOME and target EPR.
     //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME 
     Axis2SampleDocLitPortTypeStub stub= new Axis2SampleDocLitPortTypeStub(null,
                                "http://localhost:8080/axis2/services/Axis2SampleStub");
     //Create the request document to be sent.
     EchoString  reqDoc= EchoString.Factory.newInstance();
     reqDoc.setEchoString("Echo this");
     //invokes the Web service.
     EchoStringReturn resDoc=stub.echoString(reqDoc);
     System.out.println(resDoc.getEchoStringReturn());

    } catch (Exception e) {
        e.printStackTrace();
    }

The problem here is, I do see a the method getEchoStringReturn in resDoc instance of stub.

A: 

I think that the code snippet you give refers to the xmlbeans databinding and not the adb. When using adb databinding you don't have to create a request document etc etc.

Ok, I know that this probably won't solve your problem but I thought it was good to mention..

I have the same problem and if I find a solution I'll let you know

apon

related questions