Simple Domino web service Provider Example?

We want to create a really simple Domino web service that will do nothing more than return a “Hello World” to whatever client consumes it. Does anyone have the simple example of this in a Domino environment?

Thanks

Subject: Steps.

This is off the top of my head, so if I make a mistake let me know.

  1. In your database on the server go to “Code-Web Service Providers”.

  2. Click “New Web Service Provider”

  3. Give it a name HWS. Set it to LotusScript.

  4. Add the following code to the Declarations section (it will auto move it).


Class HWS

Function HelloWorld( text As String) As String

	HelloWorld = "Hello " + text

End Function

End Class

Subject: Forum ate my post. :confused:

  1. Was edit the Web Service properties. If you closed the infobox reopen it by right clicking on the source and selecting web service properties.

In the first tab set PortType class to HWS

Save the web service.

  1. In the third tab (which should be populated now) you can set your SOAP type. I normally use RPC/encoded. Save that.

There you have it. A working web service consumer.

To access the WSDL it would be.

http://server/database.nsf/HWS?WSDL

and to make the SOAP call it would be.

http://server/database.nsf/HWS?OpenWebService

Subject: *Simon, I assume you mean a “working web service provider” not consumer!

Subject: Whoops! Yes Consumer

That is what he asked for? :slight_smile: Apologies.

Subject: Doh! :smiley:

Provider… provider… Too early in the morning.

Subject: There’s a DevWorks Article on that

Julian Robichaux’s developerWorks article, “Practical Web services in IBM Lotus Domino 7: Writing and testing simple Web services.” IBM Developer

Subject: That document is a little bit out of date

R7 only had provider functionality.

R8 has provider/consumer functionality. The following wiki articles should help someone new to it.

https://ibm.biz/BdRrcq (setting up LS/Java WS consumer/providers)

and

https://ibm.biz/BdRP9h (testing with SOAPui).

Subject: and if you are interested in learning more about web services and XML

Check out the TLCC course on this topic:TLCC Course Details - Using XML and Web Services in Domino 8.5

Howard