IBM Support

webMethods Knowlegebase : ClassCastException with empty soap header (1728670)

Troubleshooting


Problem

When calling a webservice via SOAP-RPC with an emtpy soap header element as follows:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<oxy:invokeIMBBInterface SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oxy="http://IMBB_WSI/IMBB_StdWSI.adapter.services">

<WSInterfaceInDoc>

<CO_INCIDENT>

</CO_INCIDENT>

</WSInterfaceInDoc>

</oxy:invokeIMBBInterface>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

this is the error returned in soap response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Client</faultcode>

<faultstring>[ISS.0088.9134] Exception occurred while processing the body of the message</faultstring>

<faultactor>http://10.125.199.11:10308/soap/rpc</faultactor&gt;

<detail xmlns:webM="http://www.webMethods.com/2001/10/soap/encoding">

<webM:serviceStackTrace>

<webM:java>wm.server.soap:rpc</webM:java>

</webM:serviceStackTrace>

<webM:exception>

<webM:className>java.lang.ClassCastException</webM:className>

<webM:message xml:lang="">com.wm.lang.xml.TextNode cannot be cast to com.wm.app.b2b.server.saaj.SOAPHeaderElement</webM:message>

<webM:stackTrace xml:lang="">java.lang.ClassCastException: com.wm.lang.xml.TextNode cannot be cast to com.wm.app.b2b.server.saaj.SOAPHeaderElement

at com.wm.app.b2b.server.saaj.SOAPHeader$1.matchesFilter(SOAPHeader.java:281)

at com.wm.app.b2b.server.saaj.NodeIterator.keepSearching(NodeIterator.java:112)

at com.wm.app.b2b.server.saaj.NodeIterator.&lt;init>(NodeIterator.java:66)

at com.wm.app.b2b.server.saaj.NodeIterator.&lt;init>(NodeIterator.java:53)

at com.wm.app.b2b.server.saaj.SOAPHeader.examineMustUnderstandHeaderElements(SOAPHeader.java:277)

at com.wm.app.b2b.server.SOAPMessage.getHeaderMustUnderstandNodes(SOAPMessage.java:1180)

at com.wm.app.b2b.server.saaj.SOAPMessage.getHeaderMustUnderstandNodes(SOAPMessage.java:199)

at wm.server.soap.rpc(soap.java:798)

at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:403)

at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:631)

at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:40)

at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)

at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:253)

at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)

at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:228)

at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)

at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:634)

at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:536)

at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:381)

at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:237)

at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:119)

at com.wm.app.b2b.server.HTTPSOAPHandler._process(HTTPSOAPHandler.java:532)

at com.wm.app.b2b.server.HTTPSOAPHandler.process(HTTPSOAPHandler.java:146)

at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:185)

at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:334)

at com.wm.util.pool.PooledThread.run(PooledThread.java:118)

at java.lang.Thread.run(Thread.java:662)</webM:stackTrace>

</webM:exception>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

These notations of SOAP-ENV:Header element in soap request work without error:

<SOAP-ENV:Header></SOAP-ENV:Header>

<SOAP-ENV:Header/>

This notation in soap request yields the error:

<SOAP-ENV:Header>

</SOAP-ENV:Header>

Document Location

Worldwide

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSVYEV","label":"IBM webMethods Integration"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Integration Server (PIE)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSFIWYE","label":"IBM webMethods B2B"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Integration Server (PIE)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSQG2X","label":"IBM webMethods Managed File Transfer"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Integration Server (PIE)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Historical Number

Product Build 7.1.2, 7.1.3, 8.0.1

Document Information

Modified date:
20 March 2025

UID

ibm17218878