WebServices

From TeamDeveloperWiki

Jump to: navigation, search

This page covers Web services tips & tricks.

Contents


Image:Pointer.pngHow to ignore invalid SSL certificates using MSXML

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.


Image:Pointer.pngEnter new tip title here

Enter new tip description here