这是我们的 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;
}
}
在我的实现文件中我这样提到
IBMSOAPElement requestElement = (IBMSOAPElement)serviceRequest.getAny();
在这一行中它的显示
java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl incompatible with com.ibm.websphere.webservices.soap.IBMSOAPElement