You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Laurent Bovet (JIRA)" <ji...@apache.org> on 2009/10/22 09:07:52 UTC
[jira] Updated: (CAMEL-2095) Support Issue: Routing a TextMessage
from a to a JMS queue
[ https://issues.apache.org/activemq/browse/CAMEL-2095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Laurent Bovet updated CAMEL-2095:
---------------------------------
Attachment: ProxyToStringTest-context.xml
Sender.java
ProxyToStringTest.java
Added test case.
The test fails because the body is not of type String:
java.lang.AssertionError: mock://result Body of message: 0. Expected: <Hello> but was: <BeanInvocation public abstract void proxy.test.Sender.send(java.lang.String) with [Hello]]>
at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:899)
at org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:881)
at org.apache.camel.component.mock.MockEndpoint$4.run(MockEndpoint.java:371)
at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:241)
at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:208)
at proxy.test.ProxyToStringTest.testProxyToString(ProxyToStringTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Support Issue: Routing a TextMessage from a <camel:proxy> to a JMS queue
> ------------------------------------------------------------------------
>
> Key: CAMEL-2095
> URL: https://issues.apache.org/activemq/browse/CAMEL-2095
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0
> Environment: jdk 1.5, spring 2.5.6
> Reporter: Laurent Bovet
> Priority: Minor
> Attachments: ProxyToStringTest-context.xml, ProxyToStringTest.java, Sender.java
>
>
> I did not find any example or documentation for using the <camel:proxy> with a simple send(String textMessage) method and a route sending the textMessage String as body to a JMS queue (for example).
> The thing is that <camel:proxy> creates a messages with body of type BeanInvocation. I would expect that Camel provides some builtin transformer/converter to change the body to the String argument, so that the message on the queue is of type TextMessage.
> Did I miss something?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.