Hi

Welcome to the Camel community.

What version of Camel are you using?

Does your unit test run in one JVM, and Tomcat in another JMV
(possible on a remote server)?
So what you need to do is a remote communication from JVM to JVM over
the network?


What do you do in this bean, DispatcherServiceImpl ?




On Sat, Sep 24, 2011 at 1:41 PM, tatha <[email protected]> wrote:
> Hi All,
>
> I am a newbie in Camel and have to deliver a module in a very short notice.
> You know how it is :).My question may be a very basic question but i would
> really appreciate if someone could guide me on it.
>
> The requirement is to invoke a camel endpoint service deployed in a tomcat
> server from a junit test case. The Service has been injected with the
> CamelContext and it has got a set of exposed methods which needs to be
> called.We are using Spring 2.5 and Camel 2 in our project. The Spring config
> is below
>
>
> &lt;bean name="/DispatcherService"
> class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"&gt;
>        &lt;property name="service" ref="dispatcherService"/&gt;
>        &lt;property name="serviceInterface"
> value="test.DispatcherService"/&gt;
>    &lt;/bean&gt;
>
>        &lt;camelContext id="dispatcherCamelContext" trace="true"
> xmlns="http://camel.apache.org/schema/spring"&gt;
>                &lt;route&gt;
>                        &lt;from uri="direct:dispatcherChannel" /&gt;
>                                &lt;!-- use comma as a delimiter for String 
> based values --&gt;
>                                &lt;recipientList delimiter=","&gt;
>                                &lt;header&gt;serviceEndpoints&lt;/header&gt;
>                                &lt;/recipientList&gt;
>                &lt;/route&gt;
>        &lt;/camelContext&gt;
>
>        &lt;bean id="dispatcherService" class="test.DispatcherServiceImpl"&gt;
>                &lt;property name="context" ref="dispatcherCamelContext" /&gt;
>        &lt;/bean&gt;
>
>
>
> what i am not able to find is to find how can we call the end point uri
> direct:dispatcherChannel deployed in a tomcat server (http://someIP:8080)
> from a junit which uses spring configuration.
>
> Can some one please help me.
>
> Thanking all in advance.
>
> Thanks
> tatha
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Invoking-a-Camel-end-point-deployed-in-remote-Server-from-JUnit-test-case-tp4836420p4836420.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to