Rob, don't know if I'm doing you any favors ;-) . Those ant options are producing this issue:

http://issues.apache.org/jira/browse/AXIS2-649

At least you've been able to duplicate it. Those options were working for me, and I based some docs off of them. I looked into it again this last weekend, and may give it another go later tonite.

In the meantime, Ajith, could you supply some wsdl2java params for xmlbeans that are working for you? I ask because on the issue I referenced, it worked for Ajith although seemingly with different params.

The other option for the time being, Rob, is to try the 2 or 3 other  databinding options available - including ADB.

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

On 5/8/06, Rob Henley <[EMAIL PROTECTED]> wrote:
Thanks Ajith - I've deleted everything other than 1.0 jars.

Doing a bit of investigation, the 'implements' clause is generated by
WSDL2Code with these parameters
--language java --databinding-method xmlbeans -uri
my.wsdl --service-description --sync --server-side --generate-all

I've now switched to using WSDL2Java in an ant target which Robert lazarski
kindly sent me ...

    <target name="wsdl2javaUsingJava" depends="axis-init">
      <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
          <classpath refid="axis.dist.classpath"/>
          <arg value="-d"/>
          <arg value="xmlbeans"/>
          <arg value="-uri"/>
          <arg file="purchasing1.wsdl"/>
          <arg value="-ss"/>
          <arg value="-g"/>
          <arg value="-sd"/>
      </java>
     </target>

This doesn't generate the 'implements' clause but I still get the "Data
binding error" . Towards the end of the stack trace below there is a
NullPointerException at
org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041).

Do you think I'm missing some jars? The axis2\WEB-INF\lib contains
xbean-2.1.0jar.

Many thanks
Rob

     [java] client: call purchaseOrder method
     [java] client: caught AxisFault
     [java] org.apache.axis2.AxisFault: Data binding error
     [java]  at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287)
     [java]  at org.apache.axis2.PurchasingStub.purchaseOrder(Unknown
Source)
     [java]  at samples.purchasing1.ClientTest.main(Unknown Source)
     [java] Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data
binding error; nested exception is:
     [java]  java.lang.RuntimeException: Data binding error
     [java]  at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
     [java]  at
org.apache.axis2.PurchasingMessageReceiverInOut.invokeBusinessLogic (Unknown
Source)
     [java]  at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
     [java]  at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java :454)
     [java]  at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
     [java]  at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
     [java]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     [java]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     [java]  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)
     [java]  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     [java]  at
org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213)
     [java]  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
     [java]  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126)
     [java]  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     [java]  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
     [java]  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
     [java]  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
     [java]  at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:663)
     [java]  at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
     [java]  at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java :80)
     [java]  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
     [java]  at java.lang.Thread.run(Unknown Source)
     [java] Caused by: java.lang.RuntimeException: Data binding error
     [java]  at
org.apache.axis2.PurchasingMessageReceiverInOut.fromOM(Unknown Source)
     [java]  ... 21 more
     [java] Caused by: java.lang.NullPointerException
     [java]  at
org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr (Cur.java:3041)
     [java]  at
org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058)
     [java]  at
org.apache.xmlbeans.impl.store.Locale.doNamespaces(Locale.java:900)
     [java]  at
org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader (Locale.java:1135)
     [java]  at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)
     [java]  at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
     [java]  at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
     [java]  at
samples.purchasing1.PurchaseOrderDocument$Factory.parse(Unknown Source)
     [java]  ... 22 more

     [java]  at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
     [java]  ... 3 more


----- Original Message -----
From: "Ajith Ranabahu" < [EMAIL PROTECTED]>
To: <axis-user@ws.apache.org>
Sent: Monday, May 08, 2006 3:19 PM
Subject: Re: [Axis2 1.0] deployment problem?


Hmm..
Are you sure tha you are using the 1.0 jars ? We had the interface
generation as the default for a very short time in the SVN and ten
switched back to the older "no-interface" mode as the default. So
unless you specify the -ssi flag no interface will be generated!

Here is a suggession. Codegen from scratch from the latest jars and
implement the skeleton. use the generated build file to generate the
aar file. I have a feeling that there is a mix of old and new classes
in your aar which may be the problem

Ajith



On 5/8/06, Rob Henley <[EMAIL PROTECTED]> wrote:
> Thanks Ajith
> yes, I do have all those. When the errors says it can't find my
> PurchaseOrderDocument class, are you saying this might really mean it
> can't
> find some other class which this depends on?
>
> I did find one problem though. I was using my existing
> <Service> Skeleton.java and I hadn't noticed that the generated one now
> implements an interface. In my case this now looks like this ...
>
> public class PurchasingSkeleton implements PurchasingSkeletonInterface{
>
> When I add the 'implements' clause, I now get a "Data binding error" from
> the server at runtime - but the error message doesn't give any details.
>
> I'm going to try the default adb data binding instead. It didn't work in
> 0.94 but I'm hoping it is better now - I noticed there are a couple of
> restrictions in the release notes, but my example is very simple.
>
> Cheers
> Rob
> ----- Original Message -----
> From: "Ajith Ranabahu" <[EMAIL PROTECTED]>
> To: <axis-user@ws.apache.org>
> Sent: Monday, May 08, 2006 1:55 PM
> Subject: Re: [Axis2 1.0] deployment problem?
>
>
> Hi Rob,
> do you have all the XMLBeans generated classes in your aar file ? I
> mean all these files with the .xsb extension and all ?
>
> On 5/8/06, Rob Henley <[EMAIL PROTECTED]> wrote:
> >
> > I have a simple doc-literal WSDL from which I generate client stub and
> > server code using the xmlbeans data binding. I complete the skeleton and
> > write a client 'main'. I then build and deploy an aar to Axis2 under
> > tomcat.
> >
> > In 0.94, 0.95 and RC2 this was working fine, but in 1.0 when I run the
> > client I get an error from the server, which includes ...
> >
> >   org.apache.axis2.AxisFault: Transport error 500 . Error Message is ...
> >     The server encountered an internal error () that prevented it from
> > fulfilling this request.
> >        javax.servlet.ServletException: Servlet execution threw an
> > exception
> >           ... <b>root cause</b> <pre>java.lang.NoClassDefFoundError:
> > samples/purchasing1/PurchaseOrderDocument
> >
> > In the axis2 services directory,  purchasing1.aar does include
> > samples\purchasing1\PurchaseOrderDocument.class. Also, the
> > Services view
> > http://localhost:8080/axis2/services/listServices shows me
> > my Purchasing service with a status of Active and an available operation
> > purchaseOrder.
> >
> > Any ideas what has changed in 1.0 and how I can find out why my service
> > no
> > longer sees my PurchaseOrderDocument class?
> >
> > My aar contains the file meta-inf\services.xml as follows ...
> >
> > <!-- This file was auto-generated from WSDL -->
> > <!-- by the Apache Axis2 version: #axisVersion# #today# -->
> > <serviceGroup>
> > <service name="Purchasing">
> > <messageReceivers>
> > <messageReceiver
> > mep="http://www.w3.org/2004/08/wsdl/in-out"
> > class="org.apache.axis2.PurchasingMessageReceiverInOut"/>
> > </messageReceivers>
> > <parameter name="ServiceClass"
> > locked="false">org.apache.axis2.PurchasingSkeleton</parameter>
> > <operation name="purchaseOrder"
> > mep=" http://www.w3.org/2004/08/wsdl/in-out">
> > <actionMapping></actionMapping>
> > </operation>
> > </service>
> > </serviceGroup>
> >
> > Many thanks!
> >
> > Rob
>
>
> --
> Ajith Ranabahu
>
>
>
>
>


--
Ajith Ranabahu





Reply via email to