Web Service Consumer认证

Web Service Consumer with Credentials in Domino

 
Over the last while I've been tearing what little is left of my hair out trying to authenticate with a web service using Domino.

I need to put it down here so I don't forget but hopefully it will be of use to someone else too.

When creating a Web Service Consumer, Domino creates the code for you based on the WSDL

The extra piece in the jigsaw is as follows:
//Code generated by Domino
Sub NEW
Call Service.Initialize (" somethingorother ", _
" somethingorother .Domino", "http:// somethingorother/somethingorother ?OpenWebService", _
" somethingorother ")
//Code generated by Domino
//Credential Code
Call Service.setCredentials( "Username", "Password" )
//Credential Code
//Code generated by Domino
End Sub
//Code generated by Domino

You can find this in the lsxsd.lss file

Looks like it's only for 8.5. I've tried to hack it to work in 8 but to no avail so far

转自:http://blog.chrisfogarty.com/2009/09/web-service-consumer-with-credentials.html

你可能感兴趣的:(Web,service,Consumer)