Hey, 

I used WSDL2Java to generate a stub for Axis2SampleDocLitService.aar as 
instructed in user's manual.
and then tried to use the stub to write a simple client .java for its 
echoString operation (the codes are 
attached) , however, when I compiled it, it said 
 
" [javac] C:\Apache\Axis2-std-1.0\samples\src\src\echoStringClient.java:24: 
cannot apply org.apache.axis2.userguide.Axis2SampleDocLitServiceStub's 
echoString(org
.apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringParam) to (or
g.apache.axis2.userguide.xsd.EchoStringParamDocument)  "

Could anyone please tell me what's wrong with the codes?   Thanks ! 

Jenny
[EMAIL PROTECTED]
2006-05-29

----------------------------------
import org.apache.axis2.userguide.xsd.EchoStringParamDocument;
import org.apache.axis2.userguide.xsd.EchoStringParamDocument.*;
import org.apache.axis2.userguide.xsd.EchoStringReturnDocument;
import org.apache.axis2.userguide.xsd.EchoStringReturnDocument.*;
import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub;
import org.apache.axis2.addressing.EndpointReference;

public class echoStringClient {
   private static EndpointReference targetEPR = new 
EndpointReference("http://127.0.0.1:8080/axis2/services/Axis2SampleDocLitService";);

   public static void main(String[] args) {
   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 
     Axis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null,
                                
"http://localhost:8080/axis2/services/Axis2SampleDocLitService";);
  
         //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();
    }

}
}




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to