Chapter 9. Domino integration 281
Web services
There are potentially three Web services to create (for employee data, customer data, and
product catalog). We will show here only the creation of one Web service — CustomerInfo.
The other Web services can be created the same way.
First we will take a bottom up approach to create a WSDL file based on a class. Next we will
adopt the file and create the final Web service implementation in “Top Down” mode using the
changed WSDL file.
Open the repository database in the Domino Designer,
Shared Code / WebServices pane.
Click the New WebService button, name it CustomerInfo, and close the property box (there is
no portType class entered for now). See Figure 9-7.
Figure 9-7 CustomerInfo Web service properties
Apply the Option Declare Statement in (Options) and create in (Declarations) the following
classes representing the customer object and all its attributes we will maintain (Example 9-1).
Example 9-1 Code listing of declarations for customer object
Class CUSTOMER
’this class will define the customer object and its attributes
Public CUST_ID As String
Public CUST_NAME As String
Public CUST_AMGR As String
Public CUST_CONTACT_NAME As String
Public CUST_CONTACT_POSITION As String
Public CUST_CONTACT_PHONE As String
Public CUST_CONTACT_EMAIL As String
Public CUST_CRM_NO As String
Sub NEW
End Sub
End Class
Class CustomerInfo
’this class defines the web service methods (get List and get detail data)
Sub NEW
End Sub
Function GETCUSTOMERLIST(FILTER As String) As String
'this function will return the filtered customer list as string
End Function
Function GETCUSTINFO(CUST_ID As String) As CUSTOMER
'this function will return customer detail data for one selected customer