Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2.3, servicemix-cxf-bc-2008.01, servicemix-cxf-bc-2009.01
-
None
-
Any Servicemix getting JBI Exchange from outside component like Camel which adds a formatted SOAP XML message (with newline "\n" characters).
Description
CxfBcProvider and JbiOutWsdl1Interceptor when parsing JBI message assume that the next element in the DOM tree would be of type Element when parsing JBI MessageExchange for operationName.
In some cases (like JBI MessageExchange being populated by servicemix-camel component ) the JBI Message body may contain formatted XML with newline character in which case the both of them fails with java ClassCastException because the firstChild() from the SoapEnv node is TextImpl (represnting "\n") which should be skipped.
Fix involves changing blind casting to Element type to using DOMUtils from SOAP shared library which makes sure that it would return first Child Element of type Element.