Skip to main content

InterSystems IRIS Support for Web Clients

InterSystems IRIS Support for Web Clients

You can invoke an external web service from within a production. To do so, you create an InterSystems IRIS web client.

components in production send requests to web client which sends it to an external web service then the web client returns th

At a high level, your InterSystems IRIS web client receives InterSystems IRIS requests, converts them to SOAP requests and sends them to the appropriate web service. Similarly, it receives SOAP responses and converts them into InterSystems IRIS responses.

The InterSystems IRIS web client consists of the following parts, all of which you can generate in Studio by using the SOAP wizard:

  • A proxy client class that defines a proxy method for each method defined by the web service. The purpose of the proxy client is to specify the location of the web service and to contain the proxy methods. Each proxy method uses the same signature used by the corresponding web service method and invokes that method when requested.

  • A business operation that uses the InterSystems IRIS SOAP outbound adapter to invoke the proxy methods.

  • Supporting classes as needed to define XML types and production messages.

The SOAP Wizard

In order to understand these parts, it is useful to consider how they are generated. First, when you use the SOAP wizard, you provide the URL for the WSDL of the web service of interest. The wizard reads the WSDL and then generates a set of classes.

SOAP client wizard reads external WSDL file and generates classes

The Proxy Client

The generated classes include the proxy client class that defines a proxy method for each method of the web service. Each proxy method sends a SOAP request to the web service and receives the corresponding SOAP response.

proxy client classes send SOAP messages to external web service methods

As shown in the figure, the generated classes also include classes that define any XML types needed as input or output for the methods.

The Business Operation of an InterSystems IRIS Web Client

The wizard can also generate a business operation class that invokes the proxy client, as well as classes that define message types as needed. The following figure shows how these classes work:

operation calls InvokeMethod in SOAP outbound adapter which calls the specified method using the proxy class this happens onl

The classes and methods shown within dashed lines are all generated by the SOAP wizard.

The business operation uses the SOAP outbound adapter, which provides useful runtime settings and the generic method InvokeMethod(). To invoke a proxy method in the proxy client class, the business operation class calls InvokeMethod(), passing to it the name of the method to run, as well as any arguments. In turn, InvokeMethod() calls the method of the proxy client class.

FeedbackOpens in a new tab