Consuming REST, underlying connection closed: Could not establish trust relationship

Is it possible to consume a REST web service with an invalid certificate from an Outsystems cloud environment (free) ? I'm experimenting with some functionality with Outsystems that relates to an interoperability platform, and I can make requests to endpoints under the following address: https://testcomss01.playground.x-road.global

Service Studio doesn't allow me to invoke calls to this address, because of the fact that the certificate is invalid. 

Error message: "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."

Is there any way to accept this particular address/certificate in my personal Outsystems cloud instance? 

Solution

Hi Andras,

You can consume this API with http link. I have checked and it is working. 

http://testcomss01.playground.x-road.global/

But there are two thing

1. This is a SOAP service and you are consuming it as REST

2. You need its WSDL to consume this as SOAP service otherwise you have to consume as REST and manually handle the request and response.

Solution

Hi Andras,

Please take a look at this article to understand the cause of this specific error. 

If you need to consume this web service using HTTPS, it could be the case indeed that the remote certificate of the web service is invalid, but there is also an option where the remote certificate is not issued by a trustworthy authority or is self-signed. 

In the last case, we would need to install the Root CA or self-signed certificate in the Trusted Root Certification Authorities store on the server. Something you obviously could not do yourself for your Personal Environment, but you would need to ask help for from OutSystems support.

Here's some more information in this forum post.

Hope this helps.

Regards,

Nordin


Thanks Nikhil and Nordin

You both  pointed me in the right direction. I didn't realize that they also expose this service as HTTP, so changing the URL solved the immediate issue. Also the endpoint serves xml by defualt, but with the correct accept-header, it responded with a json response. 

Thanks again!