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 Fabien Couble <fa...@capgemini.com> on 2006/07/27 16:50:47 UTC

[AXIS2] parsing problem

Hi all,
I think I have a problem concerning xmlbeans.
This is what I have done:

- I have generated java code from a wsdl file with xmlbeans databinding ..
- This wsdl file contains two complex types like this:

<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>

- I deployed the web service...
- I have done a client which send a SOAP request with a parameter AnyXmlType like this:

    AnyXmlTypeInputParamDocument any = AnyXmlTypeInputParamDocument.Factory.newInstance();
   
   
   XmlCursor anycursor = any.newCursor();
   anycursor.toNextToken();
   anycursor.beginElement(new QName("essai"));
   anycursor.insertChars("test");
   anycursor.toEndToken();
   
   //Sending
   AnyXmlOptionalParamDocument doc = stub.Put(any);

- The good request is sent - (I checked with soapmonitor)
- However, an exception is raised at the server side when it wants to retrieve the request. It doesn't able to parse the soap message.
- Actually, the command fails :

    com.example.transfer_xsd.AnyXmlTypeInputParamDocument wrappedParam =
                                                         (com.example.transfer_xsd.AnyXmlTypeInputParamDocument)fromOM(
                                msgContext.getEnvelope().getBody().getFirstElement(),
                                com.example.transfer_xsd.AnyXmlTypeInputParamDocument.class,
                                getEnvelopeNamespaces(msgContext.getEnvelope()));

- In the service deployed on the server, there is the schemaorg_apache_xmlbeans directory

I think I missed something..
Do you have an idea?

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.

Re: [AXIS2] parsing problem

Posted by Fabien Couble <fa...@capgemini.com>.
Hi ajith,


As you suggest me, I look into the code and I found the exception is raised by the method:

if (extraNamespaces!=null){
      return com.example.transfer_xsd.AnyXmlTypeInputParamDocument.Factory.parse(
            param.getXMLStreamReaderWithoutCaching(), new org.apache.xmlbeans.XmlOptions().setLoadAdditionalNamespaces(extraNamespaces));
}

As it is generated by the wsdl2java code, I was wondering if the cause of this error could be my wsdl file...

Regards
Fabien

  ----- Original Message ----- 
  From: Ajith Ranabahu 
  To: axis-user@ws.apache.org 
  Sent: Friday, July 28, 2006 11:39 AM
  Subject: Re: [AXIS2] parsing problem


  Hi,
  Yep - it does - I am not really sure of the problem in your case though. Can you inspect the code inside the message receiver as to what it is trying to do ?



  On 7/28/06, Fabien Couble <fa...@capgemini.com> wrote:
    Just for information,
    is xmlbeans works properly with AXIS2?
    ----- Original Message ----- 
    From: Fabien Couble 
    To: axis-user@ws.apache.org 
    Sent: Friday, July 28, 2006 9:36 AM 
    Subject: Re: [AXIS2] parsing problem


    I still have the same problem.
    This is the exception raised: (I forgot to join it yesterday!)
    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Data binding error</faultstring><detail><Exception>org.apache.axis2.AxisFault: Data binding error; nested exception is: 
     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:100)&#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:216)&#13;
     at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.invokeBusinessLogic(WSTransferServiceMessageReceiverInOut.java:51)&#13;
     ... 20 more&#13;
    Caused by: org.apache.xmlbeans.XmlException: error: The document is not a AnyXmlTypeInputParam@http://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:179)&#13;
     ... 21 more&#13;
    </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


    I have no idea about how to solve this...
    Please, help me

    Thx 
    Fabien

      ----- Original Message ----- 
      From: Fabien Couble 
      To: axis-user@ws.apache.org 
      Sent: Thursday, July 27, 2006 4:50 PM
      Subject: [AXIS2] parsing problem 


      Hi all,
      I think I have a problem concerning xmlbeans.
      This is what I have done:

      - I have generated java code from a wsdl file with xmlbeans databinding .
      - This wsdl file contains two complex types like this:

      <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>

      - I deployed the web service...
      - I have done a client which send a SOAP request with a parameter AnyXmlType like this:

          AnyXmlTypeInputParamDocument any = AnyXmlTypeInputParamDocument.Factory.newInstance();
         
         
         XmlCursor anycursor = any.newCursor();
         anycursor.toNextToken();
         anycursor.beginElement(new QName("essai"));
         anycursor.insertChars("test");
         anycursor.toEndToken();
         
         //Sending
         AnyXmlOptionalParamDocument doc = stub.Put(any);

      - The good request is sent - (I checked with soapmonitor)
      - However, an exception is raised at the server side when it wants to retrieve the request. It doesn't able to parse the soap message.
      - Actually, the command fails :

          com.example.transfer_xsd.AnyXmlTypeInputParamDocument wrappedParam =
                                                               (com.example.transfer_xsd.AnyXmlTypeInputParamDocument)fromOM(
                                      msgContext.getEnvelope().getBody().getFirstElement(),
                                      com.example.transfer_xsd.AnyXmlTypeInputParamDocument.class,
                                      getEnvelopeNamespaces(msgContext.getEnvelope()));

      - In the service deployed on the server, there is the schemaorg_apache_xmlbeans directory

      I think I missed something..
      Do you have an idea?

      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.

           

          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.

         

          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. 

         




  -- 
  Ajith Ranabahu 

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.

Re: [AXIS2] parsing problem

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
Yep - it does - I am not really sure of the problem in your case though. Can
you inspect the code inside the message receiver as to what it is trying to
do ?


On 7/28/06, Fabien Couble <fa...@capgemini.com> wrote:
>
>  Just for information,
> is xmlbeans works properly with AXIS2?
>
> ----- Original Message -----
> *From:* Fabien Couble <fa...@capgemini.com>
> *To:* axis-user@ws.apache.org
> *Sent:* Friday, July 28, 2006 9:36 AM
> *Subject:* Re: [AXIS2] parsing problem
>
> I still have the same problem.
> This is the exception raised: (I forgot to join it yesterday!)
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header<http://schemas.xmlsoap.org/soap/envelope/%22%3E%3Csoapenv:Header>/><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Data
> binding error</faultstring><detail><Exception>org.apache.axis2.AxisFault:
> Data binding error; nested exception is:
>  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:100)&#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:216)&#13;
>  at
> com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.invokeBusinessLogic
> (WSTransferServiceMessageReceiverInOut.java:51)&#13;
>  ... 20 more&#13;
> Caused by: org.apache.xmlbeans.XmlException: error: The document is not a
> AnyXmlTypeInputParam@http://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:179)&#13;
>  ... 21 more&#13;
> </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
>
>
> I have no idea about how to solve this...
> Please, help me
>
> Thx
> Fabien
>
>
> ----- Original Message -----
> *From:* Fabien Couble <fa...@capgemini.com>
> *To:* axis-user@ws.apache.org
> *Sent:* Thursday, July 27, 2006 4:50 PM
> *Subject:* [AXIS2] parsing problem
>
> Hi all,
> I think I have a problem concerning xmlbeans.
> This is what I have done:
>
> - I have generated java code from a wsdl file with xmlbeans databinding .
> - This wsdl file contains two complex types like this:
>
> <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>
>
> - I deployed the web service...
> - I have done a client which send a SOAP request with a parameter
> AnyXmlType like this:
>
>     AnyXmlTypeInputParamDocument any =
> AnyXmlTypeInputParamDocument.Factory.newInstance();
>
>
>    XmlCursor anycursor = any.newCursor();
>    anycursor.toNextToken();
>    anycursor.beginElement(new QName("essai"));
>    anycursor.insertChars("test");
>    anycursor.toEndToken();
>
>    //Sending
>    AnyXmlOptionalParamDocument doc = stub.Put(any);
>
> - The good request is sent - (I checked with soapmonitor)
> - However, an exception is raised at the server side when it wants to
> retrieve the request. It doesn't able to parse the soap message.
> - Actually, the command fails :
>
>     com.example.transfer_xsd.AnyXmlTypeInputParamDocument wrappedParam =
>                                                          (
> com.example.transfer_xsd.AnyXmlTypeInputParamDocument)fromOM(
>                                 msgContext.getEnvelope
> ().getBody().getFirstElement(),
>
> com.example.transfer_xsd.AnyXmlTypeInputParamDocument.class,
>                                 getEnvelopeNamespaces(
> msgContext.getEnvelope()));
>
> - In the service deployed on the server, there is the
> schemaorg_apache_xmlbeans directory
>
> I think I missed something..
> Do you have an idea?
>
> 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.
>
>   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.
>
> 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.
>
>


-- 
Ajith Ranabahu

Re: [AXIS2] parsing problem

Posted by Fabien Couble <fa...@capgemini.com>.
Just for information,
is xmlbeans works properly with AXIS2?
  ----- Original Message ----- 
  From: Fabien Couble 
  To: axis-user@ws.apache.org 
  Sent: Friday, July 28, 2006 9:36 AM
  Subject: Re: [AXIS2] parsing problem


  I still have the same problem.
  This is the exception raised: (I forgot to join it yesterday!)
  <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Data binding error</faultstring><detail><Exception>org.apache.axis2.AxisFault: Data binding error; nested exception is: 
   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:100)&#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:216)&#13;
   at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.invokeBusinessLogic(WSTransferServiceMessageReceiverInOut.java:51)&#13;
   ... 20 more&#13;
  Caused by: org.apache.xmlbeans.XmlException: error: The document is not a AnyXmlTypeInputParam@http://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:179)&#13;
   ... 21 more&#13;
  </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


  I have no idea about how to solve this...
  Please, help me

  Thx 
  Fabien

    ----- Original Message ----- 
    From: Fabien Couble 
    To: axis-user@ws.apache.org 
    Sent: Thursday, July 27, 2006 4:50 PM
    Subject: [AXIS2] parsing problem


    Hi all,
    I think I have a problem concerning xmlbeans.
    This is what I have done:

    - I have generated java code from a wsdl file with xmlbeans databinding .
    - This wsdl file contains two complex types like this:

    <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>

    - I deployed the web service...
    - I have done a client which send a SOAP request with a parameter AnyXmlType like this:

        AnyXmlTypeInputParamDocument any = AnyXmlTypeInputParamDocument.Factory.newInstance();
       
       
       XmlCursor anycursor = any.newCursor();
       anycursor.toNextToken();
       anycursor.beginElement(new QName("essai"));
       anycursor.insertChars("test");
       anycursor.toEndToken();
       
       //Sending
       AnyXmlOptionalParamDocument doc = stub.Put(any);

    - The good request is sent - (I checked with soapmonitor)
    - However, an exception is raised at the server side when it wants to retrieve the request. It doesn't able to parse the soap message.
    - Actually, the command fails :

        com.example.transfer_xsd.AnyXmlTypeInputParamDocument wrappedParam =
                                                             (com.example.transfer_xsd.AnyXmlTypeInputParamDocument)fromOM(
                                    msgContext.getEnvelope().getBody().getFirstElement(),
                                    com.example.transfer_xsd.AnyXmlTypeInputParamDocument.class,
                                    getEnvelopeNamespaces(msgContext.getEnvelope()));

    - In the service deployed on the server, there is the schemaorg_apache_xmlbeans directory

    I think I missed something..
    Do you have an idea?

    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.

         

        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.

       


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.

Re: [AXIS2] parsing problem

Posted by Fabien Couble <fa...@capgemini.com>.
I still have the same problem.
This is the exception raised: (I forgot to join it yesterday!)
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Data binding error</faultstring><detail><Exception>org.apache.axis2.AxisFault: Data binding error; nested exception is: 
 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:100)&#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:216)&#13;
 at com.example.transfer_wsdl.WSTransferServiceMessageReceiverInOut.invokeBusinessLogic(WSTransferServiceMessageReceiverInOut.java:51)&#13;
 ... 20 more&#13;
Caused by: org.apache.xmlbeans.XmlException: error: The document is not a AnyXmlTypeInputParam@http://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:179)&#13;
 ... 21 more&#13;
</Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


I have no idea about how to solve this...
Please, help me

Thx 
Fabien

  ----- Original Message ----- 
  From: Fabien Couble 
  To: axis-user@ws.apache.org 
  Sent: Thursday, July 27, 2006 4:50 PM
  Subject: [AXIS2] parsing problem


  Hi all,
  I think I have a problem concerning xmlbeans.
  This is what I have done:

  - I have generated java code from a wsdl file with xmlbeans databinding .
  - This wsdl file contains two complex types like this:

  <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>

  - I deployed the web service...
  - I have done a client which send a SOAP request with a parameter AnyXmlType like this:

      AnyXmlTypeInputParamDocument any = AnyXmlTypeInputParamDocument.Factory.newInstance();
     
     
     XmlCursor anycursor = any.newCursor();
     anycursor.toNextToken();
     anycursor.beginElement(new QName("essai"));
     anycursor.insertChars("test");
     anycursor.toEndToken();
     
     //Sending
     AnyXmlOptionalParamDocument doc = stub.Put(any);

  - The good request is sent - (I checked with soapmonitor)
  - However, an exception is raised at the server side when it wants to retrieve the request. It doesn't able to parse the soap message.
  - Actually, the command fails :

      com.example.transfer_xsd.AnyXmlTypeInputParamDocument wrappedParam =
                                                           (com.example.transfer_xsd.AnyXmlTypeInputParamDocument)fromOM(
                                  msgContext.getEnvelope().getBody().getFirstElement(),
                                  com.example.transfer_xsd.AnyXmlTypeInputParamDocument.class,
                                  getEnvelopeNamespaces(msgContext.getEnvelope()));

  - In the service deployed on the server, there is the schemaorg_apache_xmlbeans directory

  I think I missed something..
  Do you have an idea?

  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.

       


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.