I have a function to get data from a webservice. It seems to reach out for http, but for https it is throwing an error. SET @cmd = STRING('https://username:password@website.com/jsoncmd?timeRange=11/06/2017%2000:05~11/06/2017%2000:09') SET @ret = f_dans_web_client_function(@cmd) error is The URI https://username:password@website.com/jsoncmd?timeRange=11/06/2017%2000:05~11/06/2017%2000:09 is invalid SQLCODE=-980, ODBC 3 State="HY000" But I can do this http to other sites. And my URL works if I put it into a browser asked 09 Nov '17, 15:35 inthexring Volker Barth |
Your https call is missing a CERTIFICATE clause, cf. that question. In contrast to your browser, SA web client functions need to explicitly specify the certificate of the according web server. answered 14 Nov '17, 03:23 Volker Barth |
Here is the definition of the function: ALTER FUNCTION "TM38"."f_dans_web_client_function"( in iScriptName varchar(500) ) returns long varchar url '!iScriptName' type 'HTTP:GET' answered 13 Nov '17, 11:13 inthexring Justin Willey That function doesn't look complete
(13 Nov '17, 13:01)
Justin Willey
Well it does not for non HTTPS request, but seems to have trouble for SSL, not sure what else I need to do, thanks
(13 Nov '17, 14:32)
inthexring
|
I think more context is needed in order to answer your question. For example, what is the definition of f_dans_web_client_function()?
Typical problems with these web services is that SA doesn't trust the CA certificate, that signed your present certificate. But I just suspect this.
What I'd like to mention here is that these errors are really meaningless. Read useless. E.g. -980 means that "URI %1 is invalid" (http://dcx.sap.com/index.html#sqla170/en/html/80ee43166ce21014869afb4a5e70a0ea.html). What does it mean invalid?! It might be that it doesn't fit into RFC 3986, or the username/password contain wrong characters, the certificate is wrong, the URL is not encoded... everything!
I remember I used another DB that showed the error "Invalid View". What does it mean?! Is it really difficult to write a proper error message?!
Sorry guys, but I think the error message are the most important things in the software.