Details
Description
With a doc/literal endpoint using PAYLOAD mode, if a client sends a request where the child element of the Body uses a default namespace and that namespace is defined on the soap envelope or soap body (and not the element itself), you either get an exception of:
1) (insecure message, no WSS4J processing)
org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName. at org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:610)[75:org.apache.camel.camel-core:2.16.3] at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:137)[75:org.apache.camel.camel-core:2.16.3]
2) Secure message:
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkNamespaceWF(CoreDocumentImpl.java:2535)[:1.8.0_66] at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:93)[:1.8.0_66] at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:78)[:1.8.0_66] at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2164)[:1.8.0_66] at com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.createAttributeNS(SOAPDocumentImpl.java:186)[162:org.apache.servicemix.bundles.saaj-impl:1.3.23.2] at com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.createAttribute(SOAPDocumentImpl.java:153)[162:org.apache.servicemix.bundles.saaj-impl:1.3.23.2] at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttribute(ElementImpl.java:498)[:1.8.0_66] at org.apache.camel.component.cxf.DefaultCxfBinding.addNamespace(DefaultCxfBinding.java:764)[76:org.apache.camel.camel-cxf:2.16.3]
both are due to camel-cxf/DefaultCxfBinding.addNamespaces not properly adding default namespace attributes to the DOM.