Domino Web Service Consumer and Passing credential

I need to create an Domino agent that consume an ASP.NET web service. This agent, when deployed, is going to be running on the server as a scheduled agent. This .NET Web Service requires authentication.

How can I pass credentials ? I wish to avoid installing third party API on my Domino Server…

Edit:

I would think Domino Server should take care of the credential passing by assuming the identity of the agent signer? Why is it not the case? Or is there something can be done on the server side instead of me taking care of it in the code? After-all, Domino server is the one thats packaging my SOAP request?

This is urgent. Any input is appreciated. Thanks!

Subject: Solved: My good deed for the day

Class ListUpdates As PortTypeBase

Sub NEW

	Call Service.Initialize ("UrnDefaultNamespaceListUpdatesService", _

	"ListUpdatesService.Domino", "http://somewebservice?OpenWebService", _

	"ListUpdates")

	Call Service.setCredentials( "myid", "mypassword" )

End Sub

End Class

Works for me :]

Subject: Thank you for the solution

This was a big help to me today.

Subject: com/ole or java…

Hi!

I don’t know a out-of-the-box-tool or lotusscript methode of domino/notes to consume a web service - normaly there are only some ways to be be a web service provider.

i know two ways to consume a web service with or without http credentials.

  1. The “Microsoft.XMLHTTP” OLE Object (just have a look at http://searchdomino.techtarget.com/tip/1,289483,sid4_gci1176810,00.html ).

  2. Using the java connection LS2J and some java code (java.net package).

Greetings Michael

Subject: You are missing a new feature in ND8

The ability to consume web services from a server or client using Java or LS was added in Notes Domino 8.

As far as authentication, there is a setcredentials method in the web service class you can use to set a username and password.

Howard

Subject: thank you and questions…

setcredentials call of webservice class from Java? or LotusScript?

Can you give me some sample snipplet?

Sorry for being so demanding… i really can’t find much help online …

again, thank you very much!

Subject: objects for webservice?

Sorry, i don’t know this objects (only my own way - with credentials) - if you’ll find this objects, post it here.

Greetings

Michael

Subject: SetCredentials

I am kept on getting the following error:“Err:(4746)Web Service XXXXX method YYYY error (401) Unauthorized at line 18”

But I am sure the credentials I passed has access to MS Web Server.

Is it possible that my HTTP Request is sent to IIS with Domino Server’s credential and IIS does not recognize the Domino box?

For the question about the SetCredentials method…

When you import the provider WSDL into Domino’s Script Library, it is automatically created into a class that is extending PortTypeBase class of the lsxsd.lss. PortTypeBase class uses another class called “NotesWebServiceEngine” that has a method call “SetCredentials” takes two params (username, password).

Subject: PortTypeBase.SetCredentials…

Ok I found the Call WebServiceEngine class method SetCredentials. But it does not seem to work.

I called it after creating the WebService instance…