You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Duan, Nick" <ND...@mcdonaldbradley.com> on 2006/07/18 22:52:44 UTC
RE: Databinding Problem/Why sjxsp.jar not bundled in axis2
Thanks Robert! I installed today's bin distribution and tried my test
again. It works!
However, I had to download the sjxsp.jar (Sun's implementation of StAX)
file from Sun's web site and add it to the classpath. Otherwise, I got
the exception: com.bea.xml.stream.MXParserFactory not found.
It looks like sjxsp.jar is required. Why wasn't it bundled with axis2?
Does apache have an equivalent implementation of StAX?
Thanks!
ND
-----Original Message-----
From: robert lazarski [mailto:robertlazarski@gmail.com]
Sent: Tuesday, July 18, 2006 3:02 PM
To: axis-user@ws.apache.org
Subject: Re: Databinding Problem
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 <ND...@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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Databinding Problem/Why sjxsp.jar not bundled in axis2
Posted by robert lazarski <ro...@gmail.com>.
Axis2 does have a stax jar bundled in the nightlies,
wstx-asl-2.9.3.jar . I've gotten bitten by this problem myself
recently.
HTH,
Robert
http://www.braziloutsource.com/
On 7/18/06, Duan, Nick <ND...@mcdonaldbradley.com> wrote:
> Thanks Robert! I installed today's bin distribution and tried my test
> again. It works!
>
> However, I had to download the sjxsp.jar (Sun's implementation of StAX)
> file from Sun's web site and add it to the classpath. Otherwise, I got
> the exception: com.bea.xml.stream.MXParserFactory not found.
>
> It looks like sjxsp.jar is required. Why wasn't it bundled with axis2?
> Does apache have an equivalent implementation of StAX?
>
> Thanks!
>
> ND
>
> -----Original Message-----
> From: robert lazarski [mailto:robertlazarski@gmail.com]
> Sent: Tuesday, July 18, 2006 3:02 PM
> To: axis-user@ws.apache.org
> Subject: Re: Databinding Problem
>
> 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 <ND...@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
>
>
> ---------------------------------------------------------------------
> 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