Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
Hi, Here is an explanation :) In Codegen what happens is that the WSDL file is read and converted into the equivalent Axis* object tree (AxisService,AxisOperation and so on). The subsequent parts of the codegen relies on this representation of the WSDL and what you get inside the resources directory is the serilization of this object tree! It is not just a copy of the original WSDL since we cannot leave certain things unchnaged when the code is generated, say relative references of XSD files. So the error may be in the serialization part of the WSDL writing. We'll look into the issue and thanks for reporting it. Ajith On 5/11/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi Anne, thanks for your response. We re-run the WSDL2Java Tool after removing the namespace attribute from the soap:body tags. However, the WSDL that is generated by the WSDL2Java tool (the one you find in the specified -o directory/resources) is not formatted like that, I've attached it. Why does the WSDL2Java Tool not just use the WSDL file given to it by the -uri switch and instead creates its own? Can you please check and see if it is valid? If not, maybe that is the source of the problem: even if you give the WSDL2Java a valid WSDL file, it creates one itself that has errors. Thanks, -- Sebastian Anne Thomas Manes wrote: Sebastian, There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.) Anne -- Ajith Ranabahu
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
In the soap:address definition: soap:address l ocation=urlThat caused the validation error you reported. There was another extraneous line break in a namespace URI -- but I don't recall where. I suspect it might generate another error. AnneOn 5/12/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: OK, I filed it... http://issues.apache.org/jira/browse/AXIS2-717Can you tell me which line you saw it in?Maybe it would be a good idea to make the WSDLs created by the tool pretty-printed, or at least more human readable.-- SebiAnne Thomas Manes wrote: For some reason the tool put a line break between the l and ocation in the location attribute in the service definition. Please file a JIRA. Anne On 5/11/06, *Sebastian J. Schultheiss* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Anne, thanks for your response. We re-run the WSDL2Java Tool after removing the namespace attribute from the soap:body tags. However, the WSDL that is generated by the WSDL2Java tool (the one you find in the specified -o directory/resources) is not formatted like that, I've attached it. Why does the WSDL2Java Tool not just use the WSDL file given to it by the -uri switch and instead creates its own? Can you please check and see if it is valid? If not, maybe that is the source of the problem: even if you give the WSDL2Java a valid WSDL file, it creates one itself that has errors. Thanks, -- Sebastian Anne Thomas Manes wrote: Sebastian, There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.) Anne
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
This WSDL looks fine.On 5/10/06, robert lazarski [EMAIL PROTECTED] wrote: Anne, might you be able to take a look at the attached wsdl ? It validates fine, but I see the same error, created a jira, and I'd like to track it down. Don't think this wsdl has changed - I thought it was working in previous axis2 versions. Thanks, Robert http://www.braziloutsource.com/ On 5/10/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: Sebastian,There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.)Anne On 5/10/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there!We've used the attached WSDL to create a service client by means ofthe WSDL2Java tool (xmlbeans databinding). After implementing thesimplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the statuspage, the service is running error free.The client was also created by WSDL2Java, where we wrote a simple main()class to test the client. We've pasted it below. public static void main(String[] args) {try {PredictLocalizationRequestDocument pdoc =PredictLocalizationRequestDocument.Factory.newInstance();pdoc.addNewPredictLocalizationRequest (); pdoc.getPredictLocalizationRequest().setSequence(ASDF);pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL);TextLocServiceStub sender = newTextLocServiceStub( http://localhost/axis2/services/TextLocService);PredictLocalizationResponseDocument res = sender.predictLocalization(pdoc); System.out.println(res.toString());} catch (Exception e) {e.printStackTrace();}}The client now runs up until the document is being sent, where it throwsan Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is notconnected to the server and doesn't throw this exception.Please let us know if we should change anything about our clientgeneration procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool.Thanks a lot for your time!Greetings,-- Sebastianorg.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)atorg.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133)at org.apache.axis2.runLoc.main(runLoc.java:26)Caused by: java.lang.Exception : org.apache.axis2.AxisFault: Data bindingerror; nested exception is:java.lang.RuntimeException: Data binding errorat org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic (TextLocServiceMessageReceiverInOut.java:66)atorg.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:454)atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java :136)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java :213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.RuntimeException: Data binding erroratorg.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM (TextLocServiceMessageReceiverInOut.java:158)atorg.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50)... 20 moreCaused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041)at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058)at org.apache.xmlbeans.impl.store.Locale.doNamespaces
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
Hi Anne, thanks for your response. We re-run the WSDL2Java Tool after removing the namespace attribute from the soap:body tags. However, the WSDL that is generated by the WSDL2Java tool (the one you find in the specified -o directory/resources) is not formatted like that, I've attached it. Why does the WSDL2Java Tool not just use the WSDL file given to it by the -uri switch and instead creates its own? Can you please check and see if it is valid? If not, maybe that is the source of the problem: even if you give the WSDL2Java a valid WSDL file, it creates one itself that has errors. Thanks, -- Sebastian Anne Thomas Manes wrote: Sebastian, There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.) Anne TextLocService.wsdl Description: WSDL2Java generated file
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
For some reason the tool put a line break between the l and ocation in the location attribute in the service definition. Please file a JIRA.Anne On 5/11/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi Anne,thanks for your response. We re-run the WSDL2Java Tool after removingthe namespace attribute from the soap:body tags. However, the WSDLthat is generated by the WSDL2Java tool (the one you find in the specified -o directory/resources) is not formatted like that, I'veattached it.Why does the WSDL2Java Tool not just use the WSDL file given to it bythe -uri switch and instead creates its own?Can you please check and see if it is valid? If not, maybe that is the source of the problem: even if you give the WSDL2Java a valid WSDL file,it creates one itself that has errors.Thanks,-- SebastianAnne Thomas Manes wrote: Sebastian, There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.) Anne
[Axis2 1.0] Data binding Error after WSDL2Java code generation
Hi there! We've used the attached WSDL to create a service client by means of the WSDL2Java tool (xmlbeans databinding). After implementing the simplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the status page, the service is running error free. The client was also created by WSDL2Java, where we wrote a simple main() class to test the client. We've pasted it below. public static void main(String[] args) { try { PredictLocalizationRequestDocument pdoc = PredictLocalizationRequestDocument.Factory.newInstance(); pdoc.addNewPredictLocalizationRequest(); pdoc.getPredictLocalizationRequest().setSequence(ASDF); pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL); TextLocServiceStub sender = new TextLocServiceStub(http://localhost/axis2/services/TextLocService;); PredictLocalizationResponseDocument res = sender.predictLocalization(pdoc); System.out.println(res.toString()); } catch (Exception e) { e.printStackTrace(); } } The client now runs up until the document is being sent, where it throws an Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is not connected to the server and doesn't throw this exception. Please let us know if we should change anything about our client generation procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool. Thanks a lot for your time! Greetings, -- Sebastian org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287) at org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133) at org.apache.axis2.runLoc.main(runLoc.java:26) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:66) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.RuntimeException: Data binding error at org.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM(TextLocServiceMessageReceiverInOut.java:158) at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50) ... 20 more Caused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041) at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058) at org.apache.xmlbeans.impl.store.Locale.doNamespaces(Locale.java:900) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1135) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) at
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
Hi,You need to run generated build.xml file or specific target ant jar-client, it will create jar file for which includes all the databinding code as well supported classes. Just make sure if that jar is in your client classpath along with other axis2 and xmlbean libraries. Hope this helps,schullerOn 5/10/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there!We've used the attached WSDL to create a service client by means ofthe WSDL2Java tool (xmlbeans databinding). After implementing thesimplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the statuspage, the service is running error free.The client was also created by WSDL2Java, where we wrote a simple main()class to test the client. We've pasted it below. public static void main(String[] args) {try {PredictLocalizationRequestDocument pdoc =PredictLocalizationRequestDocument.Factory.newInstance();pdoc.addNewPredictLocalizationRequest(); pdoc.getPredictLocalizationRequest().setSequence(ASDF);pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL);TextLocServiceStub sender = newTextLocServiceStub( http://localhost/axis2/services/TextLocService);PredictLocalizationResponseDocument res =sender.predictLocalization(pdoc); System.out.println(res.toString());} catch (Exception e) {e.printStackTrace();}}The client now runs up until the document is being sent, where it throwsan Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is notconnected to the server and doesn't throw this exception.Please let us know if we should change anything about our clientgeneration procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool.Thanks a lot for your time!Greetings,-- Sebastianorg.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)atorg.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133)at org.apache.axis2.runLoc.main(runLoc.java:26)Caused by: java.lang.Exception : org.apache.axis2.AxisFault: Data bindingerror; nested exception is:java.lang.RuntimeException: Data binding errorat org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)atorg.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic (TextLocServiceMessageReceiverInOut.java:66)atorg.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:454)atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java :136)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java :213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.RuntimeException: Data binding erroratorg.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM (TextLocServiceMessageReceiverInOut.java:158)atorg.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50)... 20 moreCaused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041)at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058)at org.apache.xmlbeans.impl.store.Locale.doNamespaces (Locale.java:900)atorg.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1135)at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
Could you please log a bug in JIRA and then upload the wsdl? So that we can track and fix the problem? thanks, dims On 5/10/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there! We've used the attached WSDL to create a service client by means of the WSDL2Java tool (xmlbeans databinding). After implementing the simplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the status page, the service is running error free. The client was also created by WSDL2Java, where we wrote a simple main() class to test the client. We've pasted it below. public static void main(String[] args) { try { PredictLocalizationRequestDocument pdoc = PredictLocalizationRequestDocument.Factory.newInstance(); pdoc.addNewPredictLocalizationRequest(); pdoc.getPredictLocalizationRequest().setSequence(ASDF); pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL); TextLocServiceStub sender = new TextLocServiceStub(http://localhost/axis2/services/TextLocService;); PredictLocalizationResponseDocument res = sender.predictLocalization(pdoc); System.out.println(res.toString()); } catch (Exception e) { e.printStackTrace(); } } The client now runs up until the document is being sent, where it throws an Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is not connected to the server and doesn't throw this exception. Please let us know if we should change anything about our client generation procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool. Thanks a lot for your time! Greetings, -- Sebastian org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287) at org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133) at org.apache.axis2.runLoc.main(runLoc.java:26) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:66) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.RuntimeException: Data binding error at org.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM(TextLocServiceMessageReceiverInOut.java:158) at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50) ... 20 more Caused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041) at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058) at org.apache.xmlbeans.impl.store.Locale.doNamespaces(Locale.java:900) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1135) at
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
There is already is a jira for this error, judging by the stack trace: http://issues.apache.org/jira/browse/AXIS2-649 I started digging deeper last weekend - I updated the issue - but I'm a bit swamped at the moment to go any further for now. Robert http://www.braziloutsource.com/On 5/10/06, Davanum Srinivas [EMAIL PROTECTED] wrote:Could you please log a bug in JIRA and then upload the wsdl? So that we can track and fix the problem?thanks,dimsOn 5/10/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there! We've used the attached WSDL to create a service client by means of the WSDL2Java tool (xmlbeans databinding). After implementing the simplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the status page, the service is running error free. The client was also created by WSDL2Java, where we wrote a simple main() class to test the client. We've pasted it below. public static void main(String[] args) { try { PredictLocalizationRequestDocument pdoc = PredictLocalizationRequestDocument.Factory.newInstance(); pdoc.addNewPredictLocalizationRequest(); pdoc.getPredictLocalizationRequest ().setSequence(ASDF); pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL); TextLocServiceStub sender = new TextLocServiceStub( http://localhost/axis2/services/TextLocService); PredictLocalizationResponseDocument res = sender.predictLocalization(pdoc); System.out.println(res.toString()); } catch (Exception e) { e.printStackTrace(); } } The client now runs up until the document is being sent, where it throws an Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is not connected to the server and doesn't throw this exception. Please let us know if we should change anything about our client generation procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool. Thanks a lot for your time! Greetings, -- Sebastian org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java :287) at org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133) at org.apache.axis2.runLoc.main(runLoc.java:26) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:66) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java :37) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service (HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java :667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java :80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.RuntimeException: Data binding error at org.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM(TextLocServiceMessageReceiverInOut.java:158) at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic (TextLocServiceMessageReceiverInOut.java:50) ... 20 more Caused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041) at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058) at org.apache.xmlbeans.impl.store.Locale.doNamespaces(Locale.java:900) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader (Locale.java:1135) at
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
Sebastian,There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.)Anne On 5/10/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there!We've used the attached WSDL to create a service client by means ofthe WSDL2Java tool (xmlbeans databinding). After implementing thesimplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the statuspage, the service is running error free.The client was also created by WSDL2Java, where we wrote a simple main()class to test the client. We've pasted it below. public static void main(String[] args) {try {PredictLocalizationRequestDocument pdoc =PredictLocalizationRequestDocument.Factory.newInstance();pdoc.addNewPredictLocalizationRequest(); pdoc.getPredictLocalizationRequest().setSequence(ASDF);pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL);TextLocServiceStub sender = newTextLocServiceStub( http://localhost/axis2/services/TextLocService);PredictLocalizationResponseDocument res =sender.predictLocalization(pdoc); System.out.println(res.toString());} catch (Exception e) {e.printStackTrace();}}The client now runs up until the document is being sent, where it throwsan Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is notconnected to the server and doesn't throw this exception.Please let us know if we should change anything about our clientgeneration procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool.Thanks a lot for your time!Greetings,-- Sebastianorg.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)atorg.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133)at org.apache.axis2.runLoc.main(runLoc.java:26)Caused by: java.lang.Exception : org.apache.axis2.AxisFault: Data bindingerror; nested exception is:java.lang.RuntimeException: Data binding errorat org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)atorg.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic (TextLocServiceMessageReceiverInOut.java:66)atorg.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:454)atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java :136)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java :213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.RuntimeException: Data binding erroratorg.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM (TextLocServiceMessageReceiverInOut.java:158)atorg.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50)... 20 moreCaused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041)at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058)at org.apache.xmlbeans.impl.store.Locale.doNamespaces (Locale.java:900)atorg.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1135)at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject (Locale.java:826)atorg.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)ataxis2.apache.org.xsd.PredictLocalizationRequestDocument$Factory.parse(PredictLocalizationRequestDocument.java
Re: [Axis2 1.0] Data binding Error after WSDL2Java code generation
Anne, might you be able to take a look at the attached wsdl ? It validates fine, but I see the same error, created a jira, and I'd like to track it down. Don't think this wsdl has changed - I thought it was working in previous axis2 versions. Thanks, Robert http://www.braziloutsource.com/ On 5/10/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: Sebastian,There are errors in your WSDL. You must remove the namespace attributes from the soap:body binding descriptions. (The namespace attribute must be use only with RPC style.)Anne On 5/10/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there!We've used the attached WSDL to create a service client by means ofthe WSDL2Java tool (xmlbeans databinding). After implementing thesimplest of business logics in the server, we deployed the service .aar in the axis2 install inside a tomcat server. According to the statuspage, the service is running error free.The client was also created by WSDL2Java, where we wrote a simple main()class to test the client. We've pasted it below. public static void main(String[] args) {try {PredictLocalizationRequestDocument pdoc =PredictLocalizationRequestDocument.Factory.newInstance();pdoc.addNewPredictLocalizationRequest (); pdoc.getPredictLocalizationRequest().setSequence(ASDF);pdoc.getPredictLocalizationRequest().setOrganism(ANIMAL);TextLocServiceStub sender = newTextLocServiceStub( http://localhost/axis2/services/TextLocService);PredictLocalizationResponseDocument res = sender.predictLocalization(pdoc); System.out.println(res.toString());} catch (Exception e) {e.printStackTrace();}}The client now runs up until the document is being sent, where it throwsan Exception. The stack trace is below. We think it is still a client-side problem, although the client does complain if it is notconnected to the server and doesn't throw this exception.Please let us know if we should change anything about our clientgeneration procedure, or how we can use the test client jar that is also generated by the WSDL2Java tool.Thanks a lot for your time!Greetings,-- Sebastianorg.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)atorg.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133)at org.apache.axis2.runLoc.main(runLoc.java:26)Caused by: java.lang.Exception : org.apache.axis2.AxisFault: Data bindingerror; nested exception is:java.lang.RuntimeException: Data binding errorat org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)at org.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic (TextLocServiceMessageReceiverInOut.java:66)atorg.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:454)atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java :136)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java :213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.RuntimeException: Data binding erroratorg.apache.axis2.TextLocServiceMessageReceiverInOut.fromOM (TextLocServiceMessageReceiverInOut.java:158)atorg.apache.axis2.TextLocServiceMessageReceiverInOut.invokeBusinessLogic(TextLocServiceMessageReceiverInOut.java:50)... 20 moreCaused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3041)at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.attr(Cur.java:3058)at org.apache.xmlbeans.impl.store.Locale.doNamespaces (Locale.java:900)atorg.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1135)at