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.