2024 Dec 25 12:36 PM - edited 2024 Dec 25 12:38 PM
Hi,
My procedure for calling an external HTTP:GET service:
CREATE PROCEDURE "dba"."WebTestRun"(in "cAccessToken" long varchar )
result( "cAttribute" long varchar,"cValue" long varchar,"npp" integer )
url 'http://OtherSite/WebTest1'
type 'HTTP:GET'
header 'Authorization: !cAccessToken'
Calling this procedure:
select cValue from dba.WebTestRun('MyToken')
where cAttribute = 'Body'
An error occurs when calling the Web service:
HTTP request failed. Status code '500 Internal Server Error'
When calling the Web Service "http://OtherSite/WebTest1" in a browser or from Postman, everything works fine. I think I am not calling 'HTTP:GET' from ASA correctly.
Calling other Web-Services from the same site, but via 'HTTP:POST' from ASA works without errors.
Request clarification before answering.
Two things I would do is set the type to HTTPS (presumably the endpoint is using https?) and also set the protocol version to 1.1 (it defaults to 1.0), like this:
CREATE PROCEDURE "dba"."WebTestRun"(in "cAccessToken" long varchar )
result( "cAttribute" long varchar,"cValue" long varchar,"npp" integer )
url 'http://OtherSite/WebTest1'
set 'HTTP(EXCEPTIONS=off; VERSION=1.1)'
type 'HTTPS:GET'
header 'Authorization: !cAccessToken'I suspect the real winner is Version 1.1 is important if the other side is proxying the connection as it requires a Host Header, 1.0 doesn't. That said I always force type's to HTTPS when I know the server uses it.
You can more about the various options here CREATE PROCEDURE Statement [Web Service] | SAP Help Portal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.