java.lang.ClassCastException: oracle.j2ee.ws.saaj.soap.TextImpl cannot be cast to javax.xml.soap.SOAPElement

别等时光非礼了梦想. 提交于 2019-12-10 18:52:35

问题


I get this java.lang.ClassCastException by trying to communicate with my Webservice which has SOAPHeader Handler implimentation.

The error occurs by

String data= ((Text) ((SOAPElement) is.next()).getChildElements().next()).getValue();

in the incomming method this class "oracle.j2ee.ws.saaj.soap.TextImpl"

I can not explain from where it comes i didn't bind it anywhere

NOTE
1. I'am using Weblogic Server 12c
2. I search after TextImpl class in the hole server but no result

May be somebody faces already this issue? Thanks for your help


回答1:


I had similar problem when i deployed my web service into IBM WAS7.0 and tested through SOAP UI. After so much of google search i came to know the root case

"issue was that whitespace in the header was incorrectly being cast to a SOAPElement which resulted in the ClassCastException."

After removed the white space in the SOAP request, it worked.

Refer the link for more information http://www-01.ibm.com/support/docview.wss?uid=swg1PK90295

Check if there is a similar issue in WebLogic too.



来源:https://stackoverflow.com/questions/19680275/java-lang-classcastexception-oracle-j2ee-ws-saaj-soap-textimpl-cannot-be-cast-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!