You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Harbeer Kadian <ha...@altair.com> on 2010/01/06 13:29:41 UTC

NoSuchEndpointException: getting exception when talking to http endpoint using camel

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
-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27026841.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Willem Jiang <wi...@gmail.com>.
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 set the BundleContext before call the 
CamelContextFactory.createContext();

Willem


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


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Willem Jiang <wi...@gmail.com>.
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 component itself :)

Willem


Harbeer Kadian wrote:
> 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 forcing us to add explicitly
> HttpComponent to talk to a http endpoint, or this is the camel way of
> sending messages to endpoints.
> 
> Thanks for the valuable suggestions added to understand the problem.
> 
> With Regads
> Harbeer kadian 
> 
> 
> 
> Harbeer Kadian wrote:
>> 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(new
>> JndiRegistry(jndiContext)); 
>>
>> but still i am getting the same exception.
>> Constructor threw exception; nested exception is
>> org.apache.camel.NoSuchEndpointException: 
>> No endpoint could be found for: 
>> http://localhost:8095/HelloWebService/services/Hello, 
>> please check your classpath contains the needed camel component jar.
>>         at
>> org.springframework.beans.factory.support.ConstructorResolver.autowir
>> eConstructor(ConstructorResolver.java:254)
>>
>> I am once again giving a detail description of my problem.
>> My route is as follows
>> from("direct:ProducerUri")
>> .to("http://localhost:8095/HelloWebService/services/Hello");
>>
>> I am creating the required soap message as follows
>>
>> String soapMessage = "<soap:Envelope
>> xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns1:sayHi
>> xmlns:ns1=\"http://cxf.ws.studies.xh.org/\"><arg0
>> xmlns:ns2=\"http://cxf.ws.studies.xh.org/\">"
>>         		+ "Harbeer Kadian" +
>> "</arg0></ns1:sayHi></soap:Body></soap:Envelope>";
>>
>> // Camel will convert string to Document object for me
>> exchange.getIn().setBody(soapMessage, Document.class);
>> exchange.setPattern(ExchangePattern.InOut);
>> exchange = producerTemplate.send("direct:ProducerUri", exchange);
>>
>> I am using an OSGI bundle to deploy this code in servicemix.
>> Other than this I am not providing any information particular to http
>> endpoint in my code or any of the configuration file
>> bundle-context.xml
>> bundle-context-osgi.xml
>>
>> Looks like all the problems are happening because of the OSGI bundle.
>>
>> Please tell if you have any idea about this problem.
>>
>> With Regards
>> Harbeer kadian
>>
>>
>>
>>
>> willem.jiang wrote:
>>> 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 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 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 of bean failed; nested exception is
>>>>> org.springframework.beans.BeanInstantiationException: Could not
>>>>> instantiate bean class
>>>>> [com.altair.hwec.connectplatform.ConnectPlatformImpl]: Constructor
>>>>> threw
>>>>> exception; 
>>>>> nested exception is java.lang.NoClassDefFoundError:
>>>>> org/apache/camel/osgi/CompositeRegistry
>>>>>
>>>>> I checked what all the camel jars are active in servicemix as of now
>>>>> Here are the details
>>>>>
>>>>> smx@root:/> osgi/list | grep camel
>>>>> [  66] [Active     ] [       ] [   60] camel-core (1.6.1.fuse)
>>>>> [  67] [Active     ] [       ] [   60] camel-osgi (1.6.1.fuse)
>>>>> [  68] [Active     ] [       ] [   60] camel-spring (1.6.1.fuse)
>>>>> [ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)
>>>>>
>>>>> 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
>>>>>>
>>>
>>>
>>
> 


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Harbeer Kadian <ha...@altair.com>.
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 forcing us to add explicitly
HttpComponent to talk to a http endpoint, or this is the camel way of
sending messages to endpoints.

Thanks for the valuable suggestions added to understand the problem.

With Regads
Harbeer kadian 



Harbeer Kadian wrote:
> 
> 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(new
> JndiRegistry(jndiContext)); 
> 
> but still i am getting the same exception.
> Constructor threw exception; nested exception is
> org.apache.camel.NoSuchEndpointException: 
> No endpoint could be found for: 
> http://localhost:8095/HelloWebService/services/Hello, 
> please check your classpath contains the needed camel component jar.
>         at
> org.springframework.beans.factory.support.ConstructorResolver.autowir
> eConstructor(ConstructorResolver.java:254)
> 
> I am once again giving a detail description of my problem.
> My route is as follows
> from("direct:ProducerUri")
> .to("http://localhost:8095/HelloWebService/services/Hello");
> 
> I am creating the required soap message as follows
> 
> String soapMessage = "<soap:Envelope
> xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns1:sayHi
> xmlns:ns1=\"http://cxf.ws.studies.xh.org/\"><arg0
> xmlns:ns2=\"http://cxf.ws.studies.xh.org/\">"
>         		+ "Harbeer Kadian" +
> "</arg0></ns1:sayHi></soap:Body></soap:Envelope>";
> 
> // Camel will convert string to Document object for me
> exchange.getIn().setBody(soapMessage, Document.class);
> exchange.setPattern(ExchangePattern.InOut);
> exchange = producerTemplate.send("direct:ProducerUri", exchange);
> 
> I am using an OSGI bundle to deploy this code in servicemix.
> Other than this I am not providing any information particular to http
> endpoint in my code or any of the configuration file
> bundle-context.xml
> bundle-context-osgi.xml
> 
> Looks like all the problems are happening because of the OSGI bundle.
> 
> Please tell if you have any idea about this problem.
> 
> With Regards
> Harbeer kadian
> 
> 
> 
> 
> willem.jiang wrote:
>> 
>> 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 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 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 of bean failed; nested exception is
>>>> org.springframework.beans.BeanInstantiationException: Could not
>>>> instantiate bean class
>>>> [com.altair.hwec.connectplatform.ConnectPlatformImpl]: Constructor
>>>> threw
>>>> exception; 
>>>> nested exception is java.lang.NoClassDefFoundError:
>>>> org/apache/camel/osgi/CompositeRegistry
>>>>
>>>> I checked what all the camel jars are active in servicemix as of now
>>>> Here are the details
>>>>
>>>> smx@root:/> osgi/list | grep camel
>>>> [  66] [Active     ] [       ] [   60] camel-core (1.6.1.fuse)
>>>> [  67] [Active     ] [       ] [   60] camel-osgi (1.6.1.fuse)
>>>> [  68] [Active     ] [       ] [   60] camel-spring (1.6.1.fuse)
>>>> [ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)
>>>>
>>>> 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
>>>>>
>>>>
>>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27073211.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Harbeer Kadian <ha...@altair.com>.
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(new
JndiRegistry(jndiContext)); 

but still i am getting the same exception.
Constructor threw exception; nested exception is
org.apache.camel.NoSuchEndpointException: 
No endpoint could be found for: 
http://localhost:8095/HelloWebService/services/Hello, 
please check your classpath contains the needed camel component jar.
        at
org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:254)

I am once again giving a detail description of my problem.
My route is as follows
from("direct:ProducerUri")
.to("http://localhost:8095/HelloWebService/services/Hello");

I am creating the required soap message as follows

String soapMessage = "<soap:Envelope
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns1:sayHi
xmlns:ns1=\"http://cxf.ws.studies.xh.org/\"><arg0
xmlns:ns2=\"http://cxf.ws.studies.xh.org/\">"
        		+ "Harbeer Kadian" +
"</arg0></ns1:sayHi></soap:Body></soap:Envelope>";

// Camel will convert string to Document object for me
exchange.getIn().setBody(soapMessage, Document.class);
exchange.setPattern(ExchangePattern.InOut);
exchange = producerTemplate.send("direct:ProducerUri", exchange);

I am using an OSGI bundle to deploy this code in servicemix.
Other than this I am not providing any information particular to http
endpoint in my code or any of the configuration file
bundle-context.xml
bundle-context-osgi.xml

Looks like all the problems are happening because of the OSGI bundle.

Please tell if you have any idea about this problem.

With Regards
Harbeer kadian




willem.jiang wrote:
> 
> 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 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 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 of bean failed; nested exception is
>>> org.springframework.beans.BeanInstantiationException: Could not
>>> instantiate bean class
>>> [com.altair.hwec.connectplatform.ConnectPlatformImpl]: Constructor threw
>>> exception; 
>>> nested exception is java.lang.NoClassDefFoundError:
>>> org/apache/camel/osgi/CompositeRegistry
>>>
>>> I checked what all the camel jars are active in servicemix as of now
>>> Here are the details
>>>
>>> smx@root:/> osgi/list | grep camel
>>> [  66] [Active     ] [       ] [   60] camel-core (1.6.1.fuse)
>>> [  67] [Active     ] [       ] [   60] camel-osgi (1.6.1.fuse)
>>> [  68] [Active     ] [       ] [   60] camel-spring (1.6.1.fuse)
>>> [ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)
>>>
>>> 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
>>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27071832.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Willem Jiang <wi...@gmail.com>.
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 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 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 of bean failed; nested exception is
>> org.springframework.beans.BeanInstantiationException: Could not
>> instantiate bean class
>> [com.altair.hwec.connectplatform.ConnectPlatformImpl]: Constructor threw
>> exception; 
>> nested exception is java.lang.NoClassDefFoundError:
>> org/apache/camel/osgi/CompositeRegistry
>>
>> I checked what all the camel jars are active in servicemix as of now
>> Here are the details
>>
>> smx@root:/> osgi/list | grep camel
>> [  66] [Active     ] [       ] [   60] camel-core (1.6.1.fuse)
>> [  67] [Active     ] [       ] [   60] camel-osgi (1.6.1.fuse)
>> [  68] [Active     ] [       ] [   60] camel-spring (1.6.1.fuse)
>> [ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)
>>
>> 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
>>>
>>
> 


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Harbeer Kadian <ha...@altair.com>.
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 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 of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class
> [com.altair.hwec.connectplatform.ConnectPlatformImpl]: Constructor threw
> exception; 
> nested exception is java.lang.NoClassDefFoundError:
> org/apache/camel/osgi/CompositeRegistry
> 
> I checked what all the camel jars are active in servicemix as of now
> Here are the details
> 
> smx@root:/> osgi/list | grep camel
> [  66] [Active     ] [       ] [   60] camel-core (1.6.1.fuse)
> [  67] [Active     ] [       ] [   60] camel-osgi (1.6.1.fuse)
> [  68] [Active     ] [       ] [   60] camel-spring (1.6.1.fuse)
> [ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)
> 
> 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
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27061333.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Harbeer Kadian <ha...@altair.com>.
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 of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [com.altair.hwec.connectplatform.ConnectPlatformImpl]:
Constructor threw exception; 
nested exception is java.lang.NoClassDefFoundError:
org/apache/camel/osgi/CompositeRegistry

I checked what all the camel jars are active in servicemix as of now
Here are the details

smx@root:/> osgi/list | grep camel
[  66] [Active     ] [       ] [   60] camel-core (1.6.1.fuse)
[  67] [Active     ] [       ] [   60] camel-osgi (1.6.1.fuse)
[  68] [Active     ] [       ] [   60] camel-spring (1.6.1.fuse)
[ 165] [Active     ] [       ] [   60] camel-http (1.6.1.fuse)

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
> 

-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27061168.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Willem Jiang <wi...@gmail.com>.
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.

[1] 
http://old.nabble.com/problem-with-simple-message-to-file-example-under-osgi-tp27013928p27026937.html
[2] 
https://svn.apache.org/repos/asf/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactory.java

Willem


Harbeer Kadian wrote:
> 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 http endpoint.
> 
> With Regards
> Harbeer kadian
> 
> 
> 
> willem.jiang wrote:
>> 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
>>>>
>>
>>
> 


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Harbeer Kadian <ha...@altair.com>.
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 http endpoint.

With Regards
Harbeer kadian



willem.jiang wrote:
> 
> 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
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27059989.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Willem Jiang <wi...@gmail.com>.
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
>>
> 


Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

Posted by Harbeer Kadian <ha...@altair.com>.
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
> 

-- 
View this message in context: http://old.nabble.com/NoSuchEndpointException%3A-getting-exception-when-talking-to-http-endpoint-using-camel-tp27026841p27055346.html
Sent from the Camel - Users mailing list archive at Nabble.com.