camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7125) tokenizeXml fails when attributes have a / in them
Date Fri, 07 Feb 2014 09:38:20 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang resolved CAMEL-7125.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11.4

Applied the patch into master, camel-2.12.x and camel-2.11.x branches.

> tokenizeXml fails when attributes have a / in them
> --------------------------------------------------
>
>                 Key: CAMEL-7125
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7125
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.2
>            Reporter: Matt Nathan
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.4, 2.12.4, 2.13.0
>
>
> {{tokenizeXml}} does not work or produce value xml output when attributes contain a {{/}}.
> The test below will fail under 2.12.2
> {code:java}
> import org.apache.camel.EndpointInject;
> import org.apache.camel.Produce;
> import org.apache.camel.ProducerTemplate;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.component.mock.MockEndpoint;
> import org.apache.camel.test.junit4.CamelTestSupport;
> import org.junit.Test;
> public class CamelTokenizeXmlTest extends CamelTestSupport {
>   @EndpointInject(uri = "mock:result")
>   protected MockEndpoint resultEndpoint;
>   @Produce(uri = "direct:start")
>   protected ProducerTemplate template;
>   @Test
>   public void testXmlWithSlash() throws Exception {
>     String message = "<parent><child attr='/' /></parent>";
>     resultEndpoint.expectedBodiesReceived("<child attr='/' />");
>     template.sendBody(message);
>     resultEndpoint.assertIsSatisfied();
>   }
>   @Override
>   protected RouteBuilder createRouteBuilder() {
>     return new RouteBuilder() {
>       @Override
>       public void configure() {
>         from("direct:start").split().tokenizeXML("child").to("mock:result");
>       }
>     };
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message