Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

RESTful services

Highlighted

RESTful services

I am trying to work on a simple job ... pick a web file and as of now just read it into a csv file. This is the error I get :
connecting to socket on port 4066
connected
Exception in component tRESTClient_1
javax.ws.rs.NotAuthorizedException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:463)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:881)
disconnected
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:852)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:410)
at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:594)
at talend_demo.restful_service_0_1.RESTful_Service.tRESTClient_1Process(RESTful_Service.java:855)
at talend_demo.restful_service_0_1.RESTful_Service.runJobInTOS(RESTful_Service.java:1229)
at talend_demo.restful_service_0_1.RESTful_Service.main(RESTful_Service.java:1086)
Job RESTful_Service ended at 12:35 02/02/2015.
I have attached the basic settings of the restful client component.
Also, when I used to run the same link in datastage (I was using a custom stage to call a unix wget command) the link required a key ("?key=abclLyDP8PTyC7XTorWA6nYwl5Dz1Anm"). If I am using the same link, I still get the following error :
tarting job RESTful_Service at 12:46 02/02/2015.
connecting to socket on port 3537
connected
Exception in component tRESTClient_1
javax.ws.rs.RedirectionException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:463)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:881)
disconnected
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:852)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:410)
at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:594)
at talend_demo.restful_service_0_1.RESTful_Service.tRESTClient_1Process(RESTful_Service.java:855)
at talend_demo.restful_service_0_1.RESTful_Service.runJobInTOS(RESTful_Service.java:1229)
at talend_demo.restful_service_0_1.RESTful_Service.main(RESTful_Service.java:1086)
Job RESTful_Service ended at 12:46 02/02/2015.
As of now all I trying to do is view the data in the file in a csv format. Later , I would like to do look up and other transformations. Please let me know where am I going wrong here. 
Highlighted

Re: RESTful services

javax.ws.rs.NotAuthorizedException
Are you sure you've got the auth set up correctly and passing the correct user/password?
Highlighted

Re: RESTful services

It does not ask for any username and password. At least in datastage, I guess the key was the authorization. But here it is not working with or without the key.
Highlighted

Re: RESTful services

Hello,
I have the same problem, I got the authorization code but I have allways the javax.ws.rs.NotAuthorizedException.
can somebody help?
Thank you!
regards

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog