wsdl2java.bat를 사용하여 스텁을 생성하려고하는데 wsdl은 두 개의 바인딩으로 구성됩니다. 나는 wsdl2bat가 첫 번째 바인딩에서 연산을위한 인터페이스를 생성하지만 초 바인딩에서 연산을 위해 아무것도 생성하지 않는다는 것을 알았다. wsdl2java.bat -uri http : // ... -o client -d adb -s -u.축 wsdl2java가 스텁의 모든 인터페이스를 생성하지 않습니다.
예를 들어 코드는 여기
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();
}
같은 문제를 보일 것입니다, 나는 스텁의 resDoc 인스턴스의 방법은 getEchoStringReturn을 볼 수 없습니다.
이것은 아마도 대답이 아닌 주석이어야하지만, 아직 의견을 게시하기에 충분한 평판이 없다는 것을 알고 있습니다. .. –