axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spies, Brennan" <Brennan.Sp...@ejgallo.com>
Subject RE: client-side Axis2SampleDocLit
Date Tue, 14 Nov 2006 17:51:55 GMT
Adrian,

Your classpath is not set correctly:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

That is, the classpath needs to reference the "root" folder of your classes
directory or the .jar/.zip file explicitly.


-----Original Message-----
From: adrian rutle [mailto:adrian@rutle.no] 
Sent: Tuesday, November 14, 2006 9:27 AM
To: axis-user@ws.apache.org
Subject: client-side Axis2SampleDocLit

Hi

D:\PhD\MOD250-JWS\axis2-bin\samples\Axis2SampleDocLitClient\build\classes>jav
a 
-
cp 
.:D:\PhD\MOD250-JWS\axis2-bin\samples\Axis2SampleDocLitClient\build\lib:D:\Ph
D\MOD250-JWS\axis2-bin\lib:D:\PhD\MOD250-JWS\axis2-bin\samples\Axis2SampleDoc
Lit
Client\build\classes\org\apache\axis2\userguide 
org.apache.axis2.userguide.TestClient


Gives:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/axis2/user
guide/TestClient



I am sure that the class file TestClient exists in that folder.

package org.apache.axis2.userguide;
import org.apache.axis2.userguide.*;
import org.apache.axis2.userguide.axis2sampledoclit.*;
import org.apache.axis2.userguide.axis2sampledoclit.impl.*;

public class TestClient
{
    public static void main(String []args){
        System.out.println("\t=== we try to run our TestClient");
       
        try
        {
            org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub
                = new 
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
                
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
            //Create the request document to be sent.
            
org.apache.axis2.userguide.axis2sampledoclit.EchoStringDocument reqDoc =
                
org.apache.axis2.userguide.axis2sampledoclit.EchoStringDocument.Factory.newIn
stance();
           
            
org.apache.axis2.userguide.axis2sampledoclit.EchoStringDocument.EchoString 
es = reqDoc.getEchoString();
            es.setEchoStringParam("Axis2 Echo");
            //invokes the Web service.
            
org.apache.axis2.userguide.axis2sampledoclit.EchoStringResponseDocument 
resDoc =
                stub.echoString(reqDoc);
            
System.out.println(resDoc.getEchoStringResponse().getEchoStringReturn());
        }
        catch (java.rmi.RemoteException e)
        {
            e.printStackTrace();
        }
       
    }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message