axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yadav, Yogendra \(IT\)" <Yogendra.Ya...@morganstanley.com>
Subject Problem running client for Axis2SampleDocLitService sample WSDL
Date Wed, 04 Oct 2006 21:50:46 GMT
Whan I run the client code written with the stub generated using
wsdl2java, I get following exception. 
I am using nightly from 10/2. Using AXIS2 SimpleHTTPServer runtime.
 
C:\work\Axis2Sample>java -cp
build\classes;C:\software\axis2\lib\axis2-kernel-SNAPSHOT.jar;C:\softwar
e\axis2\lib\xbean-2.2.0.jar;.;C:\software\ax
is2\lib\axiom-api-1.1.1.jar;C:\software\axis2\lib\stax-api-1.0.1.jar;C:\
software\axis2\lib\wsdl4j-1.6.1.jar;C:\software\axis2\lib\XmlSchema-SNAP
S
HOT.jar;C:\software\axis2\lib\commons-logging-1.1.jar;C:\software\axis2\
lib\neethi-SNAPSHOT.jar;C:\software\axis2\lib\stax-1.2.0.jar;C:\software
\
axis2\lib\axiom-impl-1.1.1.jar;C:\software\axis2\lib\xbean-2.2.0.jar;C:\
software\axis2\lib\mail-1.4.jar;C:\work\Axis2Sample\resources; Client
java.lang.NullPointerException
        at
org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.ja
va:85)
        at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:252)
        at
com.sample.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServ
iceStub.java:509)
        at Client.echoString(Client.java:26)
        at Client.main(Client.java:15)
 
 
client code looks like this:
import org.apache.axis2.userguide.xsd.*;
import org.apache.axis2.userguide.xsd.impl.*;
import com.sample.*;
 
import java.util.*;
 
public class Client{
 
public class Test
{
    public static void main(java.lang.String args[]){
        Axis2SampleDocLitServiceStub stub = null;
        try{
            stub = new Axis2SampleDocLitServiceStub(null,
 
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
            
            echoString(stub);
        } catch(Exception e){
            e.printStackTrace();
        }
    }
    public static String echoString(Axis2SampleDocLitServiceStub stub){
        try{
            EchoStringParamDocument reqDoc00 =
EchoStringParamDocument.Factory.newInstance();
            reqDoc00.setEchoStringParam("echo");
 
            EchoStringReturnDocument resDoc00 =
stub.echoString(reqDoc00);
 
            return resDoc00.getEchoStringReturn();
        } catch(Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

Mime
View raw message