You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Emilien <em...@gmail.com> on 2013/10/03 14:35:03 UTC

The facebook component does not read headers values ?

Hi everybody,

I am trying to use the facebook component in camel 2.12.1 to perform FQL
queries.
It works nice by calling the endpoint with options from the endpoint URI
(oAuthAppId, oAuthAppSecret, query).

However, when I use a bean for endpoint configuration (oAuthAppId,
oAuthAppSecret) and a header to dynamically define my query
(CamelFacebook.query), I got a NPE.

Here the route :

...
<bean id="facebook"
class="org.apache.camel.component.facebook.config.FacebookConfiguration">
 	<property name="oAuthAppId" value="**********"/>
   	<property name="oAuthAppSecret" value="******************"/>
</bean>
...		
<route id="consumeFacebookPage">
	 <from uri="direct:consumeFacebookPage"/>
		 	
	 <setHeader headerName="CamelFacebook.query">
	 	<simple>SELECT page_id FROM page WHERE name='Apache Camel'</simple>
	 </setHeader>
		 	
	 <to uri="facebook://executeFQL"/>
</route>
...

After some few modifications in the source code of the component, I can
execute the route.
You will find the corresponding patch in attachment.

Let me know if it is a bug or not.

Best regards,
Emilien

camel.patch <http://camel.465427.n5.nabble.com/file/n5740818/camel.patch>  



--
View this message in context: http://camel.465427.n5.nabble.com/The-facebook-component-does-not-read-headers-values-tp5740818.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: The facebook component does not read headers values ?

Posted by Emilien <em...@gmail.com>.
Thanks for your reply,

The JIRA is  CAMEL-6822 <https://issues.apache.org/jira/browse/CAMEL-6822> 
.

Hope the patch could help.

Best,
Emilien



--
View this message in context: http://camel.465427.n5.nabble.com/The-facebook-component-does-not-read-headers-values-tp5740818p5740862.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: The facebook component does not read headers values ?

Posted by Christian Müller <ch...@gmail.com>.
Emilien, could you please open a JIRA and attach your patch.
We are happy to review and may apply it.

Best,
Christian
Am 03.10.2013 14:35 schrieb "Emilien" <em...@gmail.com>:

> Hi everybody,
>
> I am trying to use the facebook component in camel 2.12.1 to perform FQL
> queries.
> It works nice by calling the endpoint with options from the endpoint URI
> (oAuthAppId, oAuthAppSecret, query).
>
> However, when I use a bean for endpoint configuration (oAuthAppId,
> oAuthAppSecret) and a header to dynamically define my query
> (CamelFacebook.query), I got a NPE.
>
> Here the route :
>
> ...
> <bean id="facebook"
> class="org.apache.camel.component.facebook.config.FacebookConfiguration">
>         <property name="oAuthAppId" value="**********"/>
>         <property name="oAuthAppSecret" value="******************"/>
> </bean>
> ...
> <route id="consumeFacebookPage">
>          <from uri="direct:consumeFacebookPage"/>
>
>          <setHeader headerName="CamelFacebook.query">
>                 <simple>SELECT page_id FROM page WHERE name='Apache
> Camel'</simple>
>          </setHeader>
>
>          <to uri="facebook://executeFQL"/>
> </route>
> ...
>
> After some few modifications in the source code of the component, I can
> execute the route.
> You will find the corresponding patch in attachment.
>
> Let me know if it is a bug or not.
>
> Best regards,
> Emilien
>
> camel.patch <http://camel.465427.n5.nabble.com/file/n5740818/camel.patch>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/The-facebook-component-does-not-read-headers-values-tp5740818.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>