Festus Tamakloe
Festus Tamakloe

Reputation: 11310

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

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

Upvotes: 3

Views: 5763

Answers (1)

Magesh Pachiyappan
Magesh Pachiyappan

Reputation: 146

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.

Upvotes: 5

Related Questions