We help IT Professionals succeed at work.

WEB Service for Lotus Notes

Last Modified: 2013-12-18
I have the following questions:
1. I would like to double check , if WEB service for Lotus notes only working , if I have enable application.
2. How Handle "SSN" value of the fieleld forward via WEB service  encrypt it and and then decryption of SSN values.

Is some body have any example of Lotus Notes database using of WEB services will be great ..
Thanks in advance  
Watch Question

Top Expert 2007

Are you talking about HTTP on the Server ?

It will show up in the Admin status in the Admin client.

Many database are already Web enable by default includng the Mail databases.

I hope this helps !
I think he/she is referring to Domino WebServices.
First make sure you have Domino 7 running. From the designer you can write your own WebServices and populate to web.

I didn't understand your first question, explain.

Your version of Lotus?
Do you want Domino db to act as a server or client (others using the web service you provide or you're connecting to web service from nsf)?

R7 has web service client included (you only import WSDL).


Hope this helps,


That trick.. We have only Lotus Notes 6.5 version and not planning to make upgrade to Lotus Notes7.0 ..
Any suggections  
I run web services using Domino 6.5, but it takes a bit of setup:
1)  Create a page that describes the web service (WSDL).
2)  Create an agent that will read the SOAP request, run the web service and return a SOAP response.
3)  Purchase an SSL certificate for your Domino server so that all SOAP transmisions will be encrypted.

The WSDL can be a bit tricky, but you should be able to find enough examples online to write your own.  

There are several web sites out there that describe how to accomplish this.  I have a custom class that I use to run my web services, but it contains a lot of code.  To make thisng easier to read, I will post the code in my next response:
This one is on us!
(Get your first solution completely free - no credit card required)
OK, I told you it was a lot of code!

Now, you just need to create an agent to run the service and a class to produce the SOAP response.

Creating the web service agent:
You will see in the WebService class documentation that the class can operate in two modes.  I will be using the "Service Router / Method Runner Model" for this example.

1) Create a new LotusScript agent called "WebService" and set it up as described in the class documentation under the section "The Web Service Agent".
2) Paste this code into the agent then save and close it:
      Use "ls.webservice"
      Sub Initialize
            Dim service As New WebService()
            Call service.Route()
      End Sub
3) Create a new LotusScript library and name it the same as the "Service Name" in your WSDL.  Add a Use "ls.webservice" statement to the new library.
4) In the new library, create a new class based on the "WebService" class and name it the same as the "Operation Name" in your WSDL.
5) In the operation class that you just created, override the GetReturnValue method to provide your own SOAP response.

That's it!  The hard part becomes coding the GetReturnValue method (and the WSDL - more on that in my next response).

To get a parameter from your SOAP request, use the mMethodNode member like this:

        strUsername = NotesDomGetSubNodeText(mMethodNode, "user")

The last few lines of your GetReturnValue method might look something like this:

        if (bSomeFlag) then strReturnValue = "true" else strReturnValue = "false"
        GetReturnValue = |<return xsi:type="xsd:boolean">| & strReturnValue & |</return>|      

Here is a sample WSDL file that will work with this class.  The <Computed Value> item simply contains this code:
      SERVER_NAME + "/" + @WebDbName
where SERVER_NAME is the host name stored in a profile document (ie: "www.host.com").  In this example, my custom LotusScript library would be named "Domino" and the class would be defined as follows:
      Public Class Info As WebService

<?xml version="1.0" encoding="UTF-8"?>
    <wsdl:message name="Info0In">
        <wsdl:part name="arg1" type="xsd:string" />
        <wsdl:part name="arg2" type="xsd:string" />
        <wsdl:part name="arg3" type="xsd:string" />
    <wsdl:message name="Info0Out">
        <wsdl:part name="return" type="xsd:boolean" />
    <wsdl:portType name="Domino">
        <wsdl:operation name="Info">
            <wsdl:input message="tns:Info0In" />
            <wsdl:output message="tns:Info0Out" />
    <wsdl:binding name="Domino" type="tns:Domino">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
        <wsdl:operation name="Info">
            <soap:operation soapAction="urn:Info" />
                <soap:body use="encoded" namespace="urn:Domino" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
                <soap:body use="encoded" namespace="urn:Domino" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    <wsdl:service name="Domino">
        <wsdl:port name="Domino" binding="tns:Domino">
            <soap:address location="<Computed Value>/WebService?OpenAgent"/>
Finally, here is an example of a custom class that can be used to provide a SOAP response for the WSDL in my previous post.  The name of the script library that contains this class would be "Domino" for this example.

Public Class Info As WebService
        ' * Builds the <return> node XML to be sent in the response.
      ' * Override this method to provide your own return value.
        ' * @return A string containing the XML for the <return> node.  Ex:  "<return xsi:type="xsd:string">Success</return>
      ' */
      Private Function GetReturnValue() As String
            Dim strArg1 As String
            Dim strArg2 As String
            Dim strArg3 As String
            Dim strReturnValue As String
            ' Init
            If (TRAP_ERRORS) Then On Error Goto CATCH
            strArg1 = NotesDomGetSubNodeText(mMethodNode, "arg1")
            strArg2 = NotesDomGetSubNodeText(mMethodNode, "arg2")
            strArg3 = NotesDomGetSubNodeText(mMethodNode, "arg3")
            strReturnValue = "false"
            ' Do something.
            If (strArg1 = "Some Value") Then strReturnValue = "true"
            ' Return the result of the authentication.
            GetReturnValue =       |<return xsi:type="xsd:boolean">| & strReturnValue & |</return>|            
            Exit Function
            On Error Goto THROW
            Call Me.ThrowError("")
      End Function
End Class
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.