This discussion is archived
3 Replies Latest reply: Aug 14, 2012 12:14 PM by 932337 RSS

JAX WS ClassCastException

932337 Newbie
Currently Being Moderated
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points