camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel
Date Thu, 07 Jan 2010 06:34:31 GMT
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());
  camelContext.setRegistry(compositeRegistry);

You can take a look at the Camel In Action[1]
[1] http://www.manning.com/ibsen/

Willem


Harbeer Kadian wrote:
> 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 question for you.
> Do you know any book or any good website which comprehensively explains how
> to work with apache camel.
> 
> With Regards
> Harbeer Kadian
> 
> 
> 
> 
> Harbeer Kadian wrote:
>> 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?supportedEndPointsRequest=DataManager");
>>         }
>> The wsdl for the webservice is located at following url
>> http://localhost:8083/ConnectPlatform?wsdl
>>
>> The servicemix gave exception when i tried to add this router to the camel
>> context.
>>
>> org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
>> http://localhost:8083/ConnectPlatform?supportedEndPointsRequest=DataManager,
>> please check your classpath contains the needed camel component jar.
>>         at
>> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
>>
>> I added the camel-http component in my pom.xml
>> <dependency>
>>   <groupId>org.apache.camel</groupId>
>>   <artifactId>camel-http</artifactId>
>>   <version>1.6.2.0-fuse</version>
>> </dependency>
>>
>> I also added the following packages in the OSGI Import-Package header
>> org.apache.camel.component.http
>> org.apache.camel.component.http.helper
>>
>> Still i am getting the same exception.
>>
>> Also when i perform command osgi/list on servicemix
>> I found that the camel-http component is not in the Started stage.
>> [ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)
>>
>> Please tell if i am missing some thing required to talk to a Http
>> Component. 
>>
>> With Regards
>> Harbeer Kadian
>>
> 


Mime
View raw message