I have attached a graph with 3 examples that illustrates my questions/problems.
I’m passing query parameter values to the input port of the HTTPConnector. The URL is http://host/document?cmd=*{cmd}&key=*{key}&startdate=*{startdate}
In Example 1, I pass a value of ‘2014-03-14 15:07:07’ for startdate. HTTPConnector_1 fails with message java.lang.IllegalArgumentException: Illegal character in query at index 77: http://host/document?cmd=AI:4;F:APIUTIL … 2014-03-14 15:07:07.
It doesn’t like the space between the date and time.
In Example 2, I pass a value of ‘2014-03-14&2015:07:07’ for startdate. I encoded the space. HTTPConnector_2 does not fail for an illegal character.
Question 1.
Is this expected behavior and do I have to encode the parameter values before passing to the connector.
In Example 3, I started with a url string of http://host/document?cmd=*{cmd}&key=*{key}&startdate=*{startdate}
I opened the URL Dialog made a change and saved the changes. The url now has a value of http://host/document?cmd=*%7Bcmd%7D&key … artdate%7D
The { and } characters have been encoded. When this runs, the parameter values from the input are not put into the url.
Question 2.
Is there a way to keep the encoding from happening?
Question 3.
I tried using the HTTPConnector attribute “Add input fields as parameters”, but it didn’t seem to have any effect. How is the attribute used?