axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: Databinding Problem
Date Tue, 18 Jul 2006 19:02:03 GMT
Are use using the nightlies? There have been some bugs fixed with
xmlbeans and IIRC the user guide samples since the 1.0 release:

http://people.apache.org/dist/axis2/nightly/

HTH,
Robert
http://www.braziloutsource.com/

On 7/18/06, Duan, Nick <NDuan@mcdonaldbradley.com> wrote:
> I've been trying to get the examples in the Axis2 userguide working with
> data binding for two days.   I end up with Data binding errors.  Here
> are the steps I went through:
>
> 1.  Create the stub file using WSDL2java with -d xmlbeans
> 2.  Create a client class based on the user guide as follows:
>
> import org.apache.axis.userguide.*;
> import org.apache.axis2.userguide.xsd.*;
>
> public class MyServiceTest {
>
>         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://192.168.1.228:8088/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();
>                 }
>         }
> }
>
> 3.  Added the MyServiceTest to the src tree and run ant on the
> WSDL2java-generated build.xml file.
> 4.  Run MyServiceTest class and got the following exception (I modified
> the stub class to print out the stack trace)
>
> Stack Track of Exception: nulljava.lang.NullPointerException
>         at
> org.apache.axis.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2Sa
> mpleDocLitServiceStub.java:812)
>         at
> org.apache.axis.userguide.Axis2SampleDocLitServiceStub.echoString(Axi
> s2SampleDocLitServiceStub.java:489)
>         at MyServiceTest.main(MyServiceTest.java:16)
> java.lang.RuntimeException: Data binding error
>         at
> org.apache.axis.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2Sa
> mpleDocLitServiceStub.java:868)
>         at
> org.apache.axis.userguide.Axis2SampleDocLitServiceStub.echoString(Axi
> s2SampleDocLitServiceStub.java:489)
>         at MyServiceTest.main(MyServiceTest.java:16)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.axis.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2Sa
> mpleDocLitServiceStub.java:812)
>         ... 2 more
>
> 5.  I used TCPMon to check the SOAP messages and they both seem to be
> fine.  So the problem is on the receiving part of the client.
>
> Any ideas what I did wrong?  Thanks a lot in advance!
>
> ND
>
> ---------------------------------------------------------------------
> 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