3 Replies Latest reply: Aug 14, 2012 2:14 PM by 932337 RSS

    JAX WS ClassCastException

    932337
      java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl incompatible with com.ibm.websphere.webservices.soap.IBMSOAPElement

      this is our ServiceRequest.java

      @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ServiceRequest", namespace = "http://ejb.service.blue2.bcbsa.com", propOrder = { "any" })

      public class ServiceRequest implements Serializable {

      @XmlAnyElement(lax = true)
      protected Object any;

      public Object getAny() {
      return any;
      }

      public void setAny(Object value) {
      this.any = value;
      }
      }

      in my Implementation file i mentioned like this

      IBMSOAPElement requestElement = (IBMSOAPElement)serviceRequest.getAny();

      in this line its showing java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl incompatible with com.ibm.websphere.webservices.soap.IBMSOAPElement

      Please guide me

      Thanks,
      Lenny