The script works, but now there are other annoying problems:

When I use (copy/paste) the "code listings" from the documentations to implement the client code, I get compilor errors. This is because my ant script generates an additional package (axis2sampledoclit) and puts some classes under that folder. So, I have to write my client code in this way to avoid the compiler:

But the result of running this is;
       === we try to run our TestClient
The Stub is created, hurra!
Exception in thread "main" java.lang.NullPointerException
       at org.apache.axis2.userguide.TestClient.main(TestClient.java:25)

Line 22 is underlined in the code here

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.newInstance();

           System.out.println("The Stub is created, hurra!");

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();
       }
}

}

adrian rutle skrev:

I am also working with modifying one of the bat files that came with release 1.0, it looks like:

@echo off
setlocal EnableDelayedExpansion

rem loop through the libs and add them to the class path
set AXIS2_HOME=D:\PhD\MOD250-JWS\axis2-bin\

set AXIS2_CLASS_PATH=%AXIS2_HOME%
FOR %%c in (%AXIS2_HOME%\lib\*.jar) DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c

set AXIS2_CLASS_PATH=%AXIS2_CLASS_PATH%;D:\PhD\MOD250-JWS\axis2-bin\samples\Axis2SampleDocLitClient\build\lib\Axis2SampleDocLitService-test-client.jar set AXIS2_CLASS_PATH=%AXIS2_CLASS_PATH%;D:\PhD\MOD250-JWS\axis2-bin\samples\Axis2SampleDocLitClient\build\lib\XBeans-packaged.jar

echo %AXIS2_CLASS_PATH%

java -cp %AXIS2_CLASS_PATH% org.apache.axis2.userguide.TestClient
endlocal



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

Reply via email to