WebServices

From Team Developer SqlWindows Wiki
Jump to: navigation, search

Webservices & XML


Contents


Pointer2.png How to ignore invalid SSL certificates using MSXML Pointer.png

When a WebSite returns an invalid certificate, you will get a popup window in Internet Explorer where you can ignore the error.
Using MSXML, you can do the same programatically.


Declare the following constant:

   Number: SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056


Now, set this option constant for the HTTP object

Function: ExecuteWebService
   Local variables
      MSXML2_ServerXMLHTTP60: uHTTP
      Variant: uVariantOption
   Actions
      ! Set the option to ignore certificate errors...
      Call uVariantOption.SetNumber( SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS, VT_I4 )
      Call uHTTP.setOption( 2, uVariantOption )
      !
      ! Call the WebService...
      Call uHTTP.send( ... )


Having set the option, errors like


msxml6.dll: The date in the certificate is invalid or has expired
msxml6.dll: Error downloading certificate


will be ignored.