There are some mistakes in
Axis2SampleDocLit.wsdl; you can replace those word "RPC" or
"rpc" with "document" in it,then try again.
发件人: Fabien
Couble
发送时间:
2006-07-21 03:15:53
收件人:
[email protected]
抄送:
主题: [AXIS2] userguide
Writing Web Service Clients using Code Generation with Data Binding
Support
Hi all,
I have one question concerning the userguide and
more precisely the part:
Writing Web Service Clients using Code Generation with Data Binding Support
In fact, I did everything and more precisely, I deployed the service but
now I have a problem with the client.
In fact, I copy paste the following client to invoke the service (like it
is written in the userguide):
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/Axis2SampleDocLitPortType");
//Create the request document to be sent.
EchoStringParamDocument reqDoc= EchoStringParamDocument.Factory.newInstance();
reqDoc.setEchoStringParam("Axis2 Echo");
//invokes the Web service.
EchoStringReturnDocument resDoc=stub.echoString(reqDoc);
System.out.println(resDoc.getEchoStringReturn());
} catch (Exception e) {
e.printStackTrace();
}The problem is that this code above is wrong or maybe I have missed something. I mean the echoString cannot take a EchoStringParamDocument parameter.
It is a EchoStringParam which is convenient. How can I translate a EchoStringParamDocument parameter to EchoStringParam?
Thx for your responses
Fabien
