That probably means that the Axis2 version you used to compile the
code is not the same as the one deployed in Tomcat. In particular,
"axis2-std-1.0-bin" doesn't sound good. If you are starting with Axis2
you should use version 1.5.1, unless there is a particular requirement
to use a version as old as 1.0.

Andreas

On Fri, Jan 29, 2010 at 19:23, Daniel Walsh <walsh94...@gmail.com> wrote:
> I'm trying to build and run the SampleService example from the Apache Axis2
> webpage at
> http://ws.apache.org/axis2/1_5_1/userguide-buildingservices.html#buildservices
> listings 8-10. When I try to run the client I get
> org.apache.axis2.AxisFault:
> org.apache.axiom.om.OMFactory.createOMText(Lorg/apache/axiom/om/OMElement;Ljava/lang/String;)Lorg/apache/axiom/om/OMText;
> I tried putting the message into Google and it came up with no results.
>
> I figured that as a newbie I would try the first example and build from
> there, but I don't have any idea what the error message means or what I
> should do about it. Can anyone help me out here?
>
> Thanks,
> Dan
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Here is a detailed description of what I did, in case it helps:
>
> What I did was to cut and paste SampleService, services.xml and SampleClient
> from listings 8-10 of
> http://ws.apache.org/axis2/1_5_1/userguide-buildingservices.html#buildservices
> into org/apache/axis2/axis2userguide/SampleService.java,
> META-INF/services.xml and org/apache/axis2/axis2userguide/SampleClient.java
> respectively. I also copied all the axis2 libraries from
> axis2-std-1.0-bin/lib into ../lib. I then wrote (in cygwin bash) a simple
> shell script to build and deploy the service:
>
> export CLASSPATH=`echo ../lib/*.jar | tr ' ' ';'`
> echo classpath $CLASSPATH
> javac org/apache/axis2/axis2userguide/SampleService.java
> jar cf SampleService.aar org/apache/axis2/axis2userguide/SampleService.class
> META-INF/services.xml
> cp SampleService.aar
> /cygdrive/c/tomcat-6.0.20/webapps/axis2/WEB-INF/services
>
> I ran the above script, shut down tomcat and brought it up again, and I saw
> the service deployed in http://localhost:8080/axis2/services/listServices
>
> I then wrote another shell script to compile and run the client:
>
> export CLASSPATH=`echo ../lib/*.jar | tr ' ' ';'`
> echo classpath $CLASSPATH
> javac org/apache/axis2/axis2userguide/SampleClient.java
> java -cp "$CLASSPATH;." org/apache/axis2/axis2userguide/SampleClient
>
> When I run this script I get the error mentioned above:
> org.apache.axis2.AxisFault:
> org.apache.axiom.om.OMFactory.createOMText(Lorg/apache/axiom/om/OMElement;Ljava/lang/String;)Lorg/apache/axiom/om/OMText;
>
> I swear I literally copied the SampleService, service.xml and SampleClient
> from code listings 8-10 respectively, except that I had to change line 33 of
> SampleClient because it breaks a quoted string across two lines and the
> compiler won't allow that. I changed nothing else from the example.
>
>

Reply via email to