package provides web service classes that execute iKnow queries. This chapter provides an overview of these classes and describes how to use them. It discusses the following topics:
iKnow provides the following web service classes:
To use a web service, you create and use a web client that communicates with it. To do so for an iKnow web service, you use the same procedure as with any other web service:
Create a web client that can communicate with the web service. Typically, to do so, you generate the web client using a tool provided by the client technology and you provide the WSDL of the web service as input. This process generates a set of client classes.
For example, in Caché, use the Studio SOAP wizard. For a Caché web service, Caché conveniently publishes the WSDL at the following URL:
Rather than editing the generated client classes, create an additional class or routine that uses them. The details depend on the technology.
In Caché, to use a web client, you create an instance of the web client class and then invoke its instance methods. See the following example.
For demonstration purposes, let us generate and use a Caché web client to work with an iKnow web service on the same machine. To do this in the SAMPLES
On the first screen, click URL
Type the following URL:
If needed, replace 57772 with the port that your web server uses for this installation of Caché.
The wizard generates and compiles the classes and displays a list of these classes.
This process generates the class MyClient.iKnow.Queries.EntityWSAPISoap
. This class defines a set of methods, one for each web method defined in the web service on which this client is based. Each of these methods looks like this (with illegal line breaks added here):
Method GetByFilter(domainid As %Integer, filter As %String, filtermode As %Integer, enttype As %Integer,
blackListIds As %ListOfDataTypes(ELEMENTTYPE="%String",XMLITEMNAME="blackListIdsItem",XMLNAME="blackListIds"))
As %XML.DataSet [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
The signature of this method is the same as for the corresponding method in the web service.
To use the generated client, enter the following in the Terminal in the SAMPLES
This creates an instance of the client class, which can then communicate with the web service.
Execute methods of this class. For example:
The primary iKnow APIs use arguments that cannot be easily represented in SOAP messages, so the methods in iKnow web services have different signatures than do the methods in the primary iKnow APIs. In particular, note the following differences: