Search code examples
web-serviceslotuslotusscript

Consume SSL Web Service using Domino 8.0.2


Working on a project where I need to consume a web service over HTTPS (SSL) using Domino 8.0.2.

Was able to create the script library to consume the web service.

Created a simple button to test consuming it with this code:

Use "AA-FEED"

Sub Click(Source As Button)
Dim ws1 As New IAccountService_n1
Dim r1 As New  ArrayOfValidSystem_n2

Set r1 = ws1.GetValidSystemsList()

End Sub

When called, Notes prompts for me to Cross Certify with your server, which I do.

That is to be expected.

Click on 'Cross Certify" button and then the web service is contacted and returns an error message:

"The Web Service IAccountService_n1 method GetValidSystemsList has returned a fault."

So...

The provider of the web serivce says when it is consumed in Java, they add certifier information to the soap header.

Not sure if the Cross Certify actions in Lotus would do equlivent in LotusScript.


Solution

  • If the WebService requires authentication, in your generated web service consumer code, add the following after the webservice initialize call:

    Sub NEW
        Call Service.Initialize ("UrnDefaultNamespaceWSQueryService", ...
        'ADD THE FOLLOWING
        'set userid and password if required
        Call Service.SetCredentials("userid","password")
        'set SSL options
        Call Service.SetSSLOptions(NOTES_SSL_ACCEPT_SITE_CERTS + NOTES_SSL_ACCEPT_EXPIRED_CERTS)