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 > > > <bean name="/DispatcherService" > class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> > <property name="service" ref="dispatcherService"/> > <property name="serviceInterface" > value="test.DispatcherService"/> > </bean> > > <camelContext id="dispatcherCamelContext" trace="true" > xmlns="http://camel.apache.org/schema/spring"> > <route> > <from uri="direct:dispatcherChannel" /> > <!-- use comma as a delimiter for String > based values --> > <recipientList delimiter=","> > <header>serviceEndpoints</header> > </recipientList> > </route> > </camelContext> > > <bean id="dispatcherService" class="test.DispatcherServiceImpl"> > <property name="context" ref="dispatcherCamelContext" /> > </bean> > > > > 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/
