How to consume web service XML SOAP https with C # .Net Core 2.0?

-1

I made the reference to WSDL by Visual Studio 2007 WCF, and I created a simple class to test the communication, I can not understand what is wrong, I get the error: "Could not establish trust relationship for SSL / TLS secure channel with authority ".

I've done several searches on the web and here for the stack, but nothing worked.

I ran a webservices test of mail, which is also in Https, works quietly, but running the call to another gives this error. For SoapUI, it works normally, can anyone help?

try
{

  VV_OptOutClient Soapclient = new VV_OptOutClient();

  var soapreturn = await Soapclient.atualizarOptOutAsync(obj);

  return soapreturn.retornoOptout;

}
catch (Exception e)
{

  throw new Exception(e.Message);

}
    
asked by anonymous 07.08.2018 / 19:39

1 answer

-1

Good,

I did not find solution in Using References (WCF), so I did with WebRequest myself, ignoring Tls, Ssl protocols, and circumventing certificate validation.

If one day you find an answer, please include it.

Thank you!

    
10.08.2018 / 16:28