cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aki Yoshida (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4920) TransformationInInterceptor fails when XML contains same namespace with different prefixes
Date Wed, 27 Mar 2013 22:41:15 GMT

    [ https://issues.apache.org/jira/browse/CXF-4920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615857#comment-13615857
] 

Aki Yoshida commented on CXF-4920:
----------------------------------

Hi Piotr,

I am not sure what you mean by your comment on the "prefixes" code fragment.
Both prefixes and namespaces are used along with their cache entry (corresponding to the current
level entry) to perform the two frequently used operations getNamespaceURI(String prefix)
and getPrefix(String uri) efficiently. Basically, when a particular prefix or uri is looked
up at some level, if it doesn't find the binding in that level, it goes up the level until
it finds one and then caches it at the current level so that the subsequent lookup can find
the binding in that level.

regards, aki
p.s. in any way, the fix is now all the way down to 2.5.x. Thanks again for spotting this.
                
> TransformationInInterceptor fails when XML contains same namespace with different prefixes
> ------------------------------------------------------------------------------------------
>
>                 Key: CXF-4920
>                 URL: https://issues.apache.org/jira/browse/CXF-4920
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.3, 2.4, 2.5, 2.6, 2.7.3, 2.8.0
>         Environment: FuseESB 4.4.1-07-11 on SLES
>            Reporter: Piotr Klimczak
>            Assignee: Aki Yoshida
>            Priority: Critical
>              Labels: core, failed, interceptors, missing, namespace, prefix, transform
>         Attachments: CXF4920.diff, CXF4920-v2.5.X.diff, CXF4920-v2.6.X.diff
>
>
> TransformationInInterceptor fails when XML contains same namespace with different prefixes.
> So for example this will fail:
> {code}
> <wireTransfer xmlns:q1="http://bar.com/foo" xsi:type="q1:SwiftWireTransfer">
> ...
> </wireTransfer>
> <wireTransfer xmlns:q2="http://bar.com/foo" xsi:type="q2:SwiftWireTransfer">
> ...
> </wireTransfer>
> {code}
> as for "q2:SwiftWireTransfer" the prefix q2 would be never found due to internal cache
strategy.
> So the above bug blocks usage of such kind of XML message.
> Of cource using different prefixes for same namespaces is not a good practice, but when
there is a need to "talk" with external vendor software (as in my situation) there might be
no chance to fix it on second side.
> I have this already fixed.
> Will apply patch in few moments.
> Greetings,
> Piotr Klimczak

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message