Execute failed: URI can not be built

Hello
I am new with KNIME.

I am trying to build a workflow that reads data from a RESTful service. The URL has the following format:

http://<server_name>/ProcessData/AtProcessDataREST.dll/SQL?<SQL m="1"><![CDATA[select IP_TREND_VALUE from "1.PREP1.FCB.VI.01.PV".1]]></SQL>

The GET request node complains about the format, looks like the URL is not well formatted, so I did URL encode it. When I use the following:

http://<server_name>/ProcessData/AtProcessDataREST.dll/SQL?%3CSQL%20m=%221%22%3E%3C![CDATA[select%20IP_TREND_VALUE%20from%20%221.PREP1.FCB.VI.01.PV%22.1]]%3E%3C/SQL%3E

the GET node stops complaining about the format and returns the error message above: Execute failed: URI can not be built. I don’t understand what’s wrong with it, because if I try the same 2 URL’s above using a web browser I get valid data like this:

{"data":[{"r":"D","cols":[{"i":0,"n":"IP_TREND_VALUE"}],"rows":[{"fld":[{"i":0,"v":7.8145265579223633}]}]}]}

Thanks!

Hi @svalmorri,

can you try to add your query in the “Request Headers” tab of the node dialog instead of trying to encode it directly in the URL?

Best,
Marten

Hi,

I have a similar problem so I like to reopen that topic.

@svalmorri (How) did you solve it?
I am using also a Get Request and get the same error message even after encoding the URL correctly.
@Marten_Pfannenschmidt can you explain what you meant with “add your query in the Request Headers tab”?

Thanks, Fraps

I did not solve it, I simply gave up, waiting for a solution

@svalmorri: ah ok, but thanks for your answer.

If I understood correctly you setup the complete URL and configured it in the Connection Settings tab of the GET Request node. But query parameters can also be specified in Request Header tab, by adding key value pairs to be queried.

Correct. First I used a StringManipulation to generate all URLs in one column of the dataset. I replaced all “special” characters (which could lead the GetRequest to failure, e.g. &) also with a StringManipulation. Then I’ve selected the URL column in the Connection Settings and everything worked out. So there was no need to specify anything in the Reqeust Header.