[
https://issues.apache.org/jira/browse/CAMEL-7125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868005#comment-13868005
]
Matt Nathan commented on CAMEL-7125:
------------------------------------
Fails in the same way (no message received) under: 2.12.2, 2.12.1, 2.12.0,
2.11.2, 2.11.1
Fails with the following error under 2.11.0:
{noformat}
java.lang.AssertionError: mock://result Body of message: 0. Expected: <<child
attr='/' />> but was: <<child attr='/' /></parent></child>>
at
org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1318)
at
org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:1300)
at
org.apache.camel.component.mock.MockEndpoint$5.run(MockEndpoint.java:613)
at
org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:383)
at
org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:351)
at
org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:339)
{noformat}
> 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
>
> {{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)