Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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. 
Labels (5)
3 Replies
Anonymous
Not applicable
Author

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

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.
Anonymous
Not applicable
Author

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