Hi,
I created a new camel router to send a message to a webservice using
camel-http component.
The configure method of the router is as follows.
public void configure() throws Exception {
from("direct:ProducerUri")
.to("http://localhost:8083/ConnectPlatform
How did you create the CamelContext?
As you know there are some difference between the standalone java
application and OSGi application.
If you don't use Spring configuration, you need to use
org.apache.camel.osgi.CamelContextFactory to create the CamelContext for
you, and you also need to se
I created the camel context in following way
JndiContext jndiContext = new JndiContext();
CamelContext camelContext = new DefaultCamelContext(jndiContext);
I have used jndiContext because i have to bind some bean components.
Ex:
jndiContext.bind("endPoint", new EndPointImpl());
One more questio
After you create the CamelContext with CamelContextFactory, you can set
the JndiContext with these codes
CompositeRegistry compositeRegistry = new CompositeRegistry();
compositeRegistry.addRegistry(new JndiRegistry(jndiContext));
compositeRegistry.addRegistry(context.getRegistry());
camelCon
Hi,
Thanks for your reply.
But my problem in not regarding CamelContextFactory.
When I am using a http endpoint to communicate with a web service, the
servicemix is failing to find the correct jar in the classpath to create a
http endpoint.
Please tell what are the prerequisites for using a htt
The camel-http bundle is installed and actived,
Please take a look at this thread[1], you meet the same issue.
The DefaultCamelContext can't find the camel-http component in OSGi
container, you need to setup the OSGi Resolvers as the
CamelContextFactory[2] does to make CamelContext work in OSGi.
Hi,
I changed the creation of CamelContext as per your suggestions.
I am getting following exception now.
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name ConnectPlatform' defined in URL
[bundle://186.0:0/META-INF/spring/bundle-context.xml]:
Instantiation o
Hi,
I checked the respective jar(camel-osgi) in cache folder.
To my surprise, the CompositeRegistry class is not present there.
Is it like I am using old version of camel-osgi feature.
With Regards
Harbeer Kadian
Harbeer Kadian wrote:
>
> Hi,
>
> I changed the creation of CamelContext as pe
Sorry, I just realized you are using Camel 1.6.1-fuse
You can try to use Camel 1.6.2.1-fuse or use this code.
camelContext.setRegistry(new JndiRegistry(jndiContext));
Willem
Harbeer Kadian wrote:
Hi,
I checked the respective jar(camel-osgi) in cache folder.
To my surprise, the CompositeRegist
Hi,
I did as per your suggestion.
Here is the piece of code
private CamelContext camelContext;
private CamelContextFactory camelContextFactory;
camelContextFactory = new CamelContextFactory();
camelContext = camelContextFactory.createContext();
((DefaultCamelContext)camelContext).setRegistry(ne
Hi,
I have got the solution for problem.
We have to add a component of type http in camelContext. Then only the
camelContext is able to
understand a http uri.
camelContext.addComponent("http", new HttpComponent());
The String name can be any valid string.
I dont know, whether it is osgi which is
Hi,
You just forget the most important thing of the CamelContextFactory, you
need to set the BundleContext before calling the createContext.
camelContextFactory = new CamelContextFactory();
camelContextFactory.setBundleContext(bundleContext)
Then CamelContext will find the camel-http componen
12 matches
Mail list logo