Hi all,
I'm a new user of xmlbeans. Actually, I'm using xmlbeans with AXIS2 and i have a parsing problem.
I have generated all the schemas needed by xmlbeans (a directory schemaorg_apache_xmlbeans was created ).
I have no problem to send a request. the problem is located when I receive a SOAP message. Actually, an exeption is raised. this exception tells me that it is not a correct type but my client sends the good type actually.
This is the types I declare in my wsdl file:
    <complexType name="AnyXmlType">
    <sequence>
    <xs:any namespace="##other" processContents="lax" />
    </sequence>
    </complexType>
    <complexType name="AnyXmlOptionalType">
    <sequence>
    <xs:any minOccurs="0" namespace="##other" processContents="lax" />
    </sequence>
    </complexType>
 
This is my client code:
    AnyXmlTypeInputParamDocument any = AnyXmlTypeInputParamDocument.Factory.newInstance();
   
   
   XmlCursor anycursor = any.newCursor();
   anycursor.toNextToken();
   anycursor.beginElement(new QName("essai"));
   anycursor.insertChars("Et ta race!");
   //anycursor.toEndToken();
   
   //Sending
   AnyXmlOptionalParamDocument doc = stub.Put(any);
 
And this is the Exception raised:
java.lang.RuntimeException: Data binding error&#13;
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)&#13;
 at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.invokeBusinessLogic(WSTransferServiceMessageReceiverInOut.java:88)&#13;
 at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)&#13;
 at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:503)&#13;
 at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)&#13;
 at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144)&#13;
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)&#13;
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)&#13;
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)&#13;
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)&#13;
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve..java:213)&#13;
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve..java:178)&#13;
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)&#13;
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)&#13;
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)&#13;
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)&#13;
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)&#13;
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)&#13;
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)&#13;
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)&#13;
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)&#13;
 at java.lang.Thread.run(Unknown Source)&#13;
Caused by: java.lang.RuntimeException: Data binding error&#13;
 at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.fromOM(WSTransferServiceMessageReceiverInOut.java:204)&#13;
 at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.invokeBusinessLogic(WSTransferServiceMessageReceiverInOut.java:48)&#13;
 ... 20 more&#13;
Caused by: org.apache.xmlbeans.XmlException: error: The document is not a [EMAIL PROTECTED]://example.com/transfer.xsd: document element mismatch got essai&#13;
 at org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:452)&#13;
 at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:357)&#13;
 at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:850)&#13;
 at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)&#13;
 at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)&#13;
 at com.example.transfer_xsd.AnyXmlTypeInputParamDocument$Factory.parse(AnyXmlTypeInputParamDocument.java:86)&#13;
 at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.fromOM(WSTransferServiceMessageReceiverInOut.java:167)&#13;
 ... 21 more&#13;
 
I have no idea where the problem could be
If you could help me, it would be very nice
Thx
Fabien
 
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Reply via email to