java.lang.ClassCastException:oracle.j2ee.ws.saaj.soap.TextImpl无法强制转换为javax.xml.soap.SOAPElement [英] java.lang.ClassCastException: oracle.j2ee.ws.saaj.soap.TextImpl cannot be cast to javax.xml.soap.SOAPElement
问题描述
我通过尝试与具有SOAPHeader Handler实现的Webservice进行通信来获取此java.lang.ClassCastException。
I get this java.lang.ClassCastException by trying to communicate with my Webservice which has SOAPHeader Handler implimentation.
错误发生在
String data= ((Text) ((SOAPElement) is.next()).getChildElements().next()).getValue();
在这个类 oracle.j2ee.ws.saaj的incomming方法中。 soap.TextImpl
我无法解释它来自哪里我没有绑定它
I can not explain from where it comes i didn't bind it anywhere
注意
1.我使用的是Weblogic Server 12c
2.我在洞穴服务器中搜索TextImpl类但没有结果
可能有人面临这个问题吗?
感谢您的帮助
May be somebody faces already this issue? Thanks for your help
推荐答案
当我将我的Web服务部署到IBM WAS7.0并进行测试时,我遇到了类似的问题通过SOAP UI。经过大量的谷歌搜索,我开始了解根案例
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
问题是标题中的空格被错误地强制转换为导致ClassCastException的SOAPElement。
"issue was that whitespace in the header was incorrectly being cast to a SOAPElement which resulted in the ClassCastException."
删除SOAP请求中的空格后,它有效。
After removed the white space in the SOAP request, it worked.
请参阅链接以获取更多信息< a href =http://www-01.ibm.com/support/docview.wss?uid=swg1PK90295\"rel =nofollow> http://www-01.ibm.com/support/docview.wss? uid = swg1PK90295
Refer the link for more information http://www-01.ibm.com/support/docview.wss?uid=swg1PK90295
检查WebLogic中是否存在类似问题。
Check if there is a similar issue in WebLogic too.
这篇关于java.lang.ClassCastException:oracle.j2ee.ws.saaj.soap.TextImpl无法强制转换为javax.xml.soap.SOAPElement的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!