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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

ESB tRestClient

Hi,

 

I am trying to get a response back from an API using tRestClient, however, get the below error:

 

</head><body id=ERR_ACCESS_DENIED>
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://api2.worldweatheronline.com/premium/v1/weather.ashx?key=agjdnepmndewrn8jrxagde4v&amp;q=51.920...>

<blockquote id="error">
<p><b>Access Denied.</b></p>

Access control configuration.

 

I believe I have the correct settings.

I have tried the URL in a browser and I am able to make a call to the API

 

I have googled the issue and cannot find a solution for this.

I am using Talend 7.1 Enterprise.

 

Please can you help in how I can resolve this.

 

Much Obliged. 

 

Thanks.

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

"ERROR: The requested URL could not be retrieved" is a common proxy server error. I cannot see anything you are doing wrong with your call. I can only assume that this is caused by your proxy. Are you sure you have configured your proxy access correctly? I notice that there is no username.

View solution in original post

10 Replies
Anonymous
Not applicable
Author

Can you copy your dynamic URL into a tJavaRow component and print it out to the terminal? Either use ....

System.out.println({url});

....or output the computed url to a tLogRow. Once you've done that, try the URL in a browser and see what you get. I suspect that there might be an error here.

Anonymous
Not applicable
Author

@rhall 

 

Thank you for coming back to me.

I have the URL send to a tlog and it would seem that for some reason the variables keep getting added on the url.

For some reason he url does not display correctly as it should.

I have highlighted the variable. The far left size is the global variable however it is being repeated.

 

 

 


API_URL_Log.PNG
Anonymous
Not applicable
Author

Can you copy and paste the code you are using here (not a screenshot) and copy and paste the generated URL here (not a screenshot)?

Anonymous
Not applicable
Author

@rhall 

Apologies.

 

Please see URl

I think the issue is I do not understand how the API url is set up.

I tried it with a quick google API call but it does not work.

"http://www.google.com/?q=hi"

"http://www.google.com/?q="+((String)globalMap.get("lat"))+""

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://www.google.com/?q=Hi&amp;lat=Hi">http://www.google.com/?q=Hi&amp;lat=Hi</a></p>

<blockquote id="error">
<p><b>Access Denied.</b></p>

Anonymous
Not applicable
Author

I tried it with a quick google API call but it does not work.

"http://www.google.com/?q=hi"

"http://www.google.com/?q="+((String)globalMap.get("lat"))+""

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://www.google.com/?q=Hi&amp;lat=Hi">http://www.google.com/?q=Hi&amp;lat=Hi</a></p>

<blockquote id="error">
<p><b>Access Denied.</b></p>
Anonymous
Not applicable
Author

You have some proxy settings. Since your error message is essentially the same for both URLs fired, I'd look at the proxy settings. I do not get this error when I run your google url. 

Anonymous
Not applicable
Author

@rhall 

 

This is the API that i make call to, when directly entered to web browser it makes a call

 

http://api2.worldweatheronline.com/premium/v1/weather.ashx?key=agjdnepmndewrn8jrxagde4v&q=%2251.9206...

 

This is the URL i put in the component

"http://api2.worldweatheronline.com/premium/v1/weather.ashx?key=agjdnepmndewrn8jrxagde4v&q="+((String..."

 

In the advance setting i have put the port and proxy it should be using.

 

Log Error:

<title>ERROR: The requested URL could not be retrieved</title>

 

<p>The following error was encountered while trying to retrieve the URL: <a href="http://api2.worldweatheronline.com/premium/v1/weather.ashx?key=agjdnepmndewrn8jrxagde4v&amp;q=51.920...>

<blockquote id="error">
<p><b>Access Denied.</b></p>
</blockquote>

<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>

<p>The following error was encountered while trying to retrieve the URL: <a href="http://api2.worldweatheronline.com/premium/v1/weather.ashx?key=agjdnepmndewrn8jrxagde4v&amp;q=51.920...>

I am new to working with API and from what I can see this url should work.

 

 


tRestClient.PNG
Anonymous
Not applicable
Author

"ERROR: The requested URL could not be retrieved" is a common proxy server error. I cannot see anything you are doing wrong with your call. I can only assume that this is caused by your proxy. Are you sure you have configured your proxy access correctly? I notice that there is no username.

Anonymous
Not applicable
Author

@rhall Thank you soo much for this. It was a proxy issue. The Talend was running through a server which needed this url to be added to the Proxy. i just needed to make sure that I was not doing anything wrong due to the lack of my knowledge.