camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-7125) tokenizeXml fails when attributes have a / in them
Date Thu, 06 Feb 2014 14:34:10 GMT

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

Claus Ibsen updated CAMEL-7125:
-------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 2.13.0
                   2.12.4

> 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.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