Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I created the following procedure:

CREATE OR REPLACE FUNCTION usr.MP_PostData( IN in_XML LONG VARCHAR)
RETURNS LONG VARCHAR
URL 'https://mpexport.astrata.eu/submit'
TYPE 'HTTP:POST:application/xml' 
SET 'HTTP(VERSION=1.1)'; 

I call this procedure in I-Sql passing the credentials in the XML.

In SQL Anywhere version 12 I get this error:

There was an error reading the results of the SQL statement.
The displayed results may be incorrect or incomplete.
The secure connection to the remote host failed: A certificate file must
be specified
SQLCODE=-990, ODBC 3 State="HY000"
Line 1, column 1

In SQL Anywhere 17 I get the following error:

Could not execute statement.
The secure connection to the remote host failed: The TLS handshake
failed, error code 0x2000051d
SQLCODE=-990, ODBC 3 State="HY000"
Line 1, column 1

However if I do the post with Postman everything is working fine and I get the result I expect.

What does Postman add or SQL Anywhere does not add in this situation?

asked 02 Jan '20, 10:57

Frank%20Vestjens's gravatar image

Frank Vestjens
1.3k354765
accept rate: 21%

edited 02 Jan '20, 12:12

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822


When using HTTPS, you have to specify the root certificate of the web server. Other web clients (like browsers) will usually use the OS certificate store by default and/or have a long builtin list of trusted publishers...

See that FAQ or the docs for details.

For v17, it may be enough to add

certificate 'file=*'

to the web client function declaration.

permanent link

answered 02 Jan '20, 12:06

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

edited 02 Jan '20, 12:11

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×48
×33

question asked: 02 Jan '20, 10:57

question was seen: 1,881 times

last updated: 02 Jan '20, 12:12