You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by James Carr <ja...@gmail.com> on 2009/12/30 18:11:53 UTC

Silent Failures?

Hi,

I've been trying to simply take a message sent to a cxf endpoint and
reroute it to a JMS topic. First I tried re-routing the message to a
bean and it worked fine, so I set up a jms component and tried to use
it... however when the message is sent to the CXF Http endpoint,
nothing happens... I even garbled the topic name in a vain effort to
see some sort of failure, but nothing.

Anyway to get see why the route doesn't work? If I switch it to any
other destination BESDIES the jms based component, it works perfectly
fine :(

	<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
		<property name="connectionFactory">
			<jee:jndi-lookup
jndi-name="org/jamescarr/connectionFactory"></jee:jndi-lookup>
		</property>
	</bean>
	<camel:camelContext id="camel">
		<camel:route>
			<camel:from uri="cxf:bean:routerEndpoint" />
			<camel:to uri="jms:topic:org/jamescarr/processCompleted" />
		</camel:route>
	</camel:camelContext>

Thanks,
James

Re: Silent Failures?

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

If you just want to pass the SOAP message to the JMS endpoint, you can 
try to use the MESSAGE dataformat [1].
camel-cxf endpoint will pass the raw XML message into the next endpoint 
of your route.

[1] http://camel.apache.org/cxf.html#CXF-Thedescriptionsofthedataformats

Willem


James Carr wrote:
> Turns out you were right... I had some configuration issues. After
> solving them it works like a charm with one small caveet. My goal was
> to take a SOAP message being sent to a CXF HTTP endpoint and simply
> forward the whole SOAP message to a topic that would have CXF
> endpoints attatched to consume the message. Instead, it seems to have
> passed the unmarshalled object to the topic (which is the expected
> behavior). Anyway to change it to simply forward the raw SOAP message
> to the Topic?
> 
> Thanks,
> James
> 
> On Wed, Dec 30, 2009 at 11:27 AM, James Carr <ja...@gmail.com> wrote:
>> Hmmm... I'll see if JmsTemplate will send something to the topic... if
>> it does, then I'll post the additional info.. otherwise I just didn't
>> set it up right :)
>>
>> On Wed, Dec 30, 2009 at 11:18 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>> On Wed, Dec 30, 2009 at 6:11 PM, James Carr <ja...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> I've been trying to simply take a message sent to a cxf endpoint and
>>>> reroute it to a JMS topic. First I tried re-routing the message to a
>>>> bean and it worked fine, so I set up a jms component and tried to use
>>>> it... however when the message is sent to the CXF Http endpoint,
>>>> nothing happens... I even garbled the topic name in a vain effort to
>>>> see some sort of failure, but nothing.
>>>>
>>>> Anyway to get see why the route doesn't work? If I switch it to any
>>>> other destination BESDIES the jms based component, it works perfectly
>>>> fine :(
>>>>
>>> You gotta provide more details such as
>>> - camel version
>>> - jdk version
>>> - which JMS broker
>>> - do you got all the required jars on the classpath for the JMS broker
>>> - What kind of error do you get?
>>> - have you before send to the JMS broker from Java?
>>> - what container do you use etc.
>>>
>>>
>>>
>>>>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>>>>                <property name="connectionFactory">
>>>>                        <jee:jndi-lookup
>>>> jndi-name="org/jamescarr/connectionFactory"></jee:jndi-lookup>
>>>>                </property>
>>>>        </bean>
>>>>        <camel:camelContext id="camel">
>>>>                <camel:route>
>>>>                        <camel:from uri="cxf:bean:routerEndpoint" />
>>>>                        <camel:to uri="jms:topic:org/jamescarr/processCompleted" />
>>>>                </camel:route>
>>>>        </camel:camelContext>
>>>>
>>>> Thanks,
>>>> James
>>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
> 


Re: Silent Failures?

Posted by James Carr <ja...@gmail.com>.
Turns out you were right... I had some configuration issues. After
solving them it works like a charm with one small caveet. My goal was
to take a SOAP message being sent to a CXF HTTP endpoint and simply
forward the whole SOAP message to a topic that would have CXF
endpoints attatched to consume the message. Instead, it seems to have
passed the unmarshalled object to the topic (which is the expected
behavior). Anyway to change it to simply forward the raw SOAP message
to the Topic?

Thanks,
James

On Wed, Dec 30, 2009 at 11:27 AM, James Carr <ja...@gmail.com> wrote:
> Hmmm... I'll see if JmsTemplate will send something to the topic... if
> it does, then I'll post the additional info.. otherwise I just didn't
> set it up right :)
>
> On Wed, Dec 30, 2009 at 11:18 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> On Wed, Dec 30, 2009 at 6:11 PM, James Carr <ja...@gmail.com> wrote:
>>> Hi,
>>>
>>> I've been trying to simply take a message sent to a cxf endpoint and
>>> reroute it to a JMS topic. First I tried re-routing the message to a
>>> bean and it worked fine, so I set up a jms component and tried to use
>>> it... however when the message is sent to the CXF Http endpoint,
>>> nothing happens... I even garbled the topic name in a vain effort to
>>> see some sort of failure, but nothing.
>>>
>>> Anyway to get see why the route doesn't work? If I switch it to any
>>> other destination BESDIES the jms based component, it works perfectly
>>> fine :(
>>>
>>
>> You gotta provide more details such as
>> - camel version
>> - jdk version
>> - which JMS broker
>> - do you got all the required jars on the classpath for the JMS broker
>> - What kind of error do you get?
>> - have you before send to the JMS broker from Java?
>> - what container do you use etc.
>>
>>
>>
>>>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>>>                <property name="connectionFactory">
>>>                        <jee:jndi-lookup
>>> jndi-name="org/jamescarr/connectionFactory"></jee:jndi-lookup>
>>>                </property>
>>>        </bean>
>>>        <camel:camelContext id="camel">
>>>                <camel:route>
>>>                        <camel:from uri="cxf:bean:routerEndpoint" />
>>>                        <camel:to uri="jms:topic:org/jamescarr/processCompleted" />
>>>                </camel:route>
>>>        </camel:camelContext>
>>>
>>> Thanks,
>>> James
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>

Re: Silent Failures?

Posted by James Carr <ja...@gmail.com>.
Hmmm... I'll see if JmsTemplate will send something to the topic... if
it does, then I'll post the additional info.. otherwise I just didn't
set it up right :)

On Wed, Dec 30, 2009 at 11:18 AM, Claus Ibsen <cl...@gmail.com> wrote:
> On Wed, Dec 30, 2009 at 6:11 PM, James Carr <ja...@gmail.com> wrote:
>> Hi,
>>
>> I've been trying to simply take a message sent to a cxf endpoint and
>> reroute it to a JMS topic. First I tried re-routing the message to a
>> bean and it worked fine, so I set up a jms component and tried to use
>> it... however when the message is sent to the CXF Http endpoint,
>> nothing happens... I even garbled the topic name in a vain effort to
>> see some sort of failure, but nothing.
>>
>> Anyway to get see why the route doesn't work? If I switch it to any
>> other destination BESDIES the jms based component, it works perfectly
>> fine :(
>>
>
> You gotta provide more details such as
> - camel version
> - jdk version
> - which JMS broker
> - do you got all the required jars on the classpath for the JMS broker
> - What kind of error do you get?
> - have you before send to the JMS broker from Java?
> - what container do you use etc.
>
>
>
>>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>>                <property name="connectionFactory">
>>                        <jee:jndi-lookup
>> jndi-name="org/jamescarr/connectionFactory"></jee:jndi-lookup>
>>                </property>
>>        </bean>
>>        <camel:camelContext id="camel">
>>                <camel:route>
>>                        <camel:from uri="cxf:bean:routerEndpoint" />
>>                        <camel:to uri="jms:topic:org/jamescarr/processCompleted" />
>>                </camel:route>
>>        </camel:camelContext>
>>
>> Thanks,
>> James
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Re: Silent Failures?

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Dec 30, 2009 at 6:11 PM, James Carr <ja...@gmail.com> wrote:
> Hi,
>
> I've been trying to simply take a message sent to a cxf endpoint and
> reroute it to a JMS topic. First I tried re-routing the message to a
> bean and it worked fine, so I set up a jms component and tried to use
> it... however when the message is sent to the CXF Http endpoint,
> nothing happens... I even garbled the topic name in a vain effort to
> see some sort of failure, but nothing.
>
> Anyway to get see why the route doesn't work? If I switch it to any
> other destination BESDIES the jms based component, it works perfectly
> fine :(
>

You gotta provide more details such as
- camel version
- jdk version
- which JMS broker
- do you got all the required jars on the classpath for the JMS broker
- What kind of error do you get?
- have you before send to the JMS broker from Java?
- what container do you use etc.



>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                <property name="connectionFactory">
>                        <jee:jndi-lookup
> jndi-name="org/jamescarr/connectionFactory"></jee:jndi-lookup>
>                </property>
>        </bean>
>        <camel:camelContext id="camel">
>                <camel:route>
>                        <camel:from uri="cxf:bean:routerEndpoint" />
>                        <camel:to uri="jms:topic:org/jamescarr/processCompleted" />
>                </camel:route>
>        </camel:camelContext>
>
> Thanks,
> James
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus