Announcement Announcement Module
Collapse
No announcement yet.
XMLBeans and AbstractMarshallingPayloadEndpoint Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


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

      Comment

      Working...
      X