Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

There is web procedure:

create procedure dba.sp_authentication( 
  RequestXml xml,
  urlSpec long varchar,
  certificatekey long varchar ) 
url '!urlSpec' 
type 'HTTP:POST:application/xml' 
set 'HTTP(VERSION=1.1)' 
certificate '!certificatekey'

The login and password are variables in the URL, for example:

urlSpec='https://........com/eForms_0315/api/setfieldset?web_login=...&cin=...

Certificate:

X.509 Certificate
-----------------
Common Name:             Starfield Root Certificate Authority - G2
Country Code:            US
State/Province:          Arizona
Locality:                Scottsdale
Organization:            Starfield Technologies, Inc.
Issuer:                  Starfield Root Certificate Authority - G2
Serial Number:           0
Issued:                  Sep 1, 2009   3:00:00
Expires:                 Jan 2, 2038   2:59:59
Signature Algorithm:     RSA, SHA256
Key Type:                RSA
Key Size:                2048 bits
Basic Constraints:       Is a certificate authority, path length limit: 0
Key Usage:               Certificate Signing, CRL Signing

remote_idle_timeout = '0'.

If the request is executed in SQLAnywhere/12.0.1.4436, then there is no error.
If the request is executed in SQLAnywhere/16.0.0.2546, then the following error occurs:

The secure connection to the remote host failed: The connection was
closed from the other side
SQLCODE=-990, ODBC 3 State="HY000".

WEb log (-zoc) does not show the error and is completely identical for both builds:

[connid = 1, 01/22 14:30:08.113, RESPONSE]
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Mon, 22 Jan 2018 11:31:42 GMT
Content-Type: application/xml;charset=UTF-8
Content-Length: 0
Connection: close
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Set-Cookie: JSESSIONID=FC191F23F99DA29160C6F0CB39464029; Path=/eForms_0315; HttpOnly

[connid = 1, socket closed]

Any suggestions?

asked 22 Jan '18, 08:20

Ilia63's gravatar image

Ilia63
1.2k545982
accept rate: 44%

edited 22 Jan '18, 08:27


I assume that the error was due to the fact that the web-service returns an empty Body in the response.
Probably, this behavior is acceptable for SQLAnywhere/12.0.1.4436 and is unacceptable for SQLAnywhere/16.0.0.2546, that is, it triggers the exception (i.e. SQLCODE=-990).
ps I processed only the Status:

select * ... with(attribute long varchar,value long varchar) ...
select value ... where lower(attribute) = 'status'

and did not pay attention to the Body in the response.

permanent link

answered 24 Jan '18, 05:05

Ilia63's gravatar image

Ilia63
1.2k545982
accept rate: 44%

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:

×439
×261
×63
×48

question asked: 22 Jan '18, 08:20

question was seen: 3,512 times

last updated: 24 Jan '18, 05:05