You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Fabien Couble <fa...@capgemini.com> on 2006/07/20 16:08:26 UTC

[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 responsesFabien

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.