Hi All,
Found the solution:
1) If we use SET DEFINE before running the Select statement, the URL call is successful
2) In Stored procedure there is no need to call SET DEFINE. Stored procedure will work properly without it. It will send the URL as it to the destination system. no need to worry about the oracle/sql escape characters in the URL