[
https://issues.apache.org/jira/browse/CAMEL-8663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14535058#comment-14535058
]
Akitoshi Yoshida commented on CAMEL-8663:
-----------------------------------------
Hi Stephan,
thanks.
1. aah. I often forget to run the sourcecheck because it's not active by
default clean install ;-( thanks
2. okay. But we need to change this logic so that the additional ns-decls get
included only at the root level and not at any time when the namespaces are
read at the first time. Otherwise you'll get an inconsistent behavior when some
app repeatedly invokes next() and then does getNamespaceXX. At that point, the
added prefixes might have be overwritten at some higher level. And also the
additional ns-decls need to be included back at the root level at its
end-element event. I'll adjust this accordingly.
3. okay
4. okay
5. thought about this for a while, That will make it more practical for most
camel users. So okay. fine.
Willem already fixed some of the original checkstyle issue. So I need to run
the merge against the earlier version and then rebasing to the current version.
And there are still several checkstyle errors that I need to fix before pushing
the change this time. So just a moment.
> Namespaces defined on the SOAP envelope get lost in PAYLOAD mode
> ----------------------------------------------------------------
>
> Key: CAMEL-8663
> URL: https://issues.apache.org/jira/browse/CAMEL-8663
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf
> Reporter: Stephan Siano
> Assignee: Akitoshi Yoshida
> Attachments:
> 0001-CAMEL-8663-Namespaces-defined-on-SOAP-envelope-lost-.patch,
> 0001-Extension-to-Aki-s-patch.patch
>
>
> If a request message is send to a CXF consumer or a response is returned to
> the CXF provider that contains namespace definions at the SOAP envelope and
> the Camel-CXF endpoint is configured in PAYLOAD mode the namespace definition
> gets lost unless streaming is disabled.
> If the resulting CxfPayload is then converted e.g. to String that String will
> contain invalid XML (because some namespace definition is missing).
> For non-streaming mode (system property
> org.apache.camel.component.cxf.streaming is set to false) there are special
> precautions met to set these envelope namespaces on the first DOM element of
> the payload but this coding is missing for StAX.
> The messages in question look like that:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <ns2:getTokenResponse xmlns:ns2="http://camel.apache.org/cxf/namespace">
> <return xsi:type="xs:string">Return Value</return>
> </ns2:getTokenResponse>
> </soap:Body>
> </soap:Envelope>
> If the CxfPayload is converted to String it will lack the definition for the
> xsi namespace prefix (and further XML parsing will fail).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)