You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by S-camel <s....@gmail.com> on 2016/05/29 19:29:49 UTC

LinkedIn Component

Hi all,

Currently I am developing a Camel route where I want to retrieve data from
LinkedIn API. After reading the documentation and configuring the settings
on LinkedIn  the camel route is running.

from("direct:foo")
.to("linkedin://people/person?clientId=[clientId]&clientSecret=[clientSecret]&userName=[userName]&userPassword=[userPassword]&redirectUri=https://example.com/auth/callback");
.to("file:foo"); 

My questions are as follow:
1. On which side of the route do I need to specify the LinkedIn Component.
2. How can I log the payload of the API. 
Basically I want to confirm that the API call was successful.

[                          main] DefaultCamelContext            INFO  Apache
Camel 2.17.0 (CamelContext: camel-1) is starting
[                          main] ManagedManagementStrategy      INFO  JMX is
enabled
[                          main] DefaultTypeConverter           INFO  Loaded
182 type converters
[                          main] DefaultRuntimeEndpointRegistry INFO 
Runtime endpoint registry is in extended mode gathering usage statistics of
all incoming and outgoing endpoints (cache limit: 1000)
[                          main] SSLContextParameters           INFO 
Available providers: SUN version 1.7.
[                          main] DefaultCamelContext            INFO 
AllowUseOriginalMessage is enabled. If access to the original message is not
needed, then its recommended to turn this option off as it may improve
performance.
[                          main] DefaultCamelContext            INFO 
StreamCaching is not in use. If using streams then its recommended to enable
stream caching. See more details at
http://camel.apache.org/stream-caching.html
[                          main] DefaultCamelContext            INFO  Route:
route1 started and consuming from: Endpoint[direct://foo]
[                          main] DefaultCamelContext            INFO  Total
1 routes, of which 1 are started.
[                          main] DefaultCamelContext            INFO  Apache
Camel 2.17.0 (CamelContext: camel-1) started in 1.657 seconds
[                          main] DefaultCamelContext            INFO  Apache
Camel 2.17.0 (CamelContext: camel-1) is shutting down
[                          main] DefaultShutdownStrategy        INFO 
Starting to graceful shutdown 1 routes (timeout 300 seconds)
[el-1) thread #0 - ShutdownTask] DefaultShutdownStrategy        INFO  Route:
route1 shutdown complete, was consuming from: Endpoint[direct://foo]
[                          main] DefaultShutdownStrategy        INFO 
Graceful shutdown of 1 routes completed in 0 seconds
[                          main] DefaultCamelContext            INFO  Apache
Camel 2.17.0 (CamelContext: camel-1) uptime 3.676 seconds
[                          main] DefaultCamelContext            INFO  Apache
Camel 2.17.0 (CamelContext: camel-1) is shutdown in 0.003 seconds





--
View this message in context: http://camel.465427.n5.nabble.com/LinkedIn-Component-tp5783226.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: LinkedIn Component

Posted by S-camel <s....@gmail.com>.
When I put lazyAuth on false I get the following error:

Caused by: java.lang.SecurityException: Invalid CSRF code!
at
org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter.getRefreshToken(LinkedInOAuthRequestFilter.java:214)
at
org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter.updateOAuthToken(LinkedInOAuthRequestFilter.java:294)

at
org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter.<init>(LinkedInOAuthRequestFilter.java:125)



--
View this message in context: http://camel.465427.n5.nabble.com/LinkedIn-Component-tp5783226p5783281.html
Sent from the Camel - Users mailing list archive at Nabble.com.