Results 1 to 3 of 3

Thread: XMLBeans and AbstractMarshallingPayloadEndpoint

  1. #1
    Join Date
    Nov 2007
    Posts
    4

    Default XMLBeans and AbstractMarshallingPayloadEndpoint

    I am using MXLBeans and AbstractMarshallingPayloadEndpoint as endpoint.

    In endpoint class
    ----------------
    protected Object invokeInternal(Object requestElement) throws Exception {
    System.out.println("in endpoint 1: "+requestElement);
    // The above println statement gives proper XML request as shown below.
    //<employeeRequest xmlns="http://employee.com/model">NS115//</employeeRequest>
    EmployeeRequestDocument requestDocument = (EmployeeRequestDocument) requestElement;
    //.........
    //.........
    }

    When casting the "requestElement" to "EmployeeRequestDocument" its giving the following error.
    Exception in thread "main" org.springframework.ws.soap.client.SoapFaultClient Exception: org.apache.xmlbeans.impl.values.XmlAnyTypeImpl
    at org.springframework.ws.soap.client.core.SoapFaultM essageResolver.resolveFault(SoapFaultMessageResolv er.java:37)
    at org.springframework.ws.client.core.WebServiceTempl ate.handleFault(WebServiceTemplate.java:529)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:412)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:358)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:304)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:289)
    at com.employee.ws.client.EmployeeClient.getEmployeeD etails(EmployeeClient.java:37)
    at com.employee.ws.client.EmployeeClient.main(Employe eClient.java:69)

    Can anyone help me in solving this problem?

    Thanks
    venu

  2. #2
    Join Date
    Aug 2006
    Posts
    13

    Default

    I had this problem once. It was because I generated the xmlbeans classes using a newer version of xmlbeans.jar (distribution) compared to the jar file that I had in my project, so when running the application you get XmlAnyType error. Hope this helps...

    Gautam

  3. #3
    Join Date
    Nov 2007
    Posts
    4

    Default

    I used XMLBeans 2.2 instead of 1.0.4 and this problem is solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •