Worklight to Microsoft .NET: request-response pattern

Use the Worklight: Microsoft .NET request-response pattern to integrate a mobile application written for the Worklight platform with Microsoft .NET applications running on the IBM Integration Bus. You can use the pattern to make a Microsoft .NET class available through REST APIs used by mobile applications running on many types of device.

A diagram showing the behavior of the pattern

Solution

An instance of the Worklight: Microsoft .NET request-response pattern is configured with a class written in any of the programming languages supported by the Microsoft .NET platform; for example, C# or VB.NET. The pattern instance generates message flows that implement a web service facade to the .Microsoft NET class. The pattern user can select a class from their Microsoft .NET assembly to enable as a web service. The pattern also generates a Worklight adapter that configures a set of procedures that are used by REST calls from the mobile application.

When a mobile application uses the REST API, Worklight passes the JSON parameters from the call to the Worklight adapter generated by this pattern. The adapter uses the SOAP web service on the Integration Bus, passing the parameters from the mobile application. The pattern instance that is running on the Integration Bus uses the Microsoft .NET class and passes in the input parameters. Output, reference and return value parameters from the Microsoft .NET class are returned to the mobile application through the Worklight adapter.

Generated Web Services

The pattern instance generates message flows that implement a web service. The pattern instance also generates a multi-file WSDL that represents the web services interface between the Worklight adapter and the IBM Integration Bus. The web service provides an interface to the Microsoft .NET application that can be used by other requesting applications.

The WSDL files are a WS-I compliant web services description. The first WSDL file contains a WSDL port type definition, and an operation for each static method selected in the Microsoft .NET class. Each operation has an input message and an output message. The second WSDL file contains a SOAP service and port definition. The SOAP address of the web service is configured as a pattern parameter. The pattern instance also generates an XML schema file. The XML schema represents the data types for all input and output parameters for each WSDL operation. The schema file is included in the WSDL file using a standard WSDL include statement.

Deployment

The pattern generates an Integration Bus application that must be deployed to the Integration Bus runtime. The Worklight adapter must be deployed to the Worklight Server to provide the interface between the mobile application and the web service that is running on the Integration Bus.

Constraints on the use of the pattern
Worklight adapters
Tasks to complete before applying the pattern
Parameters for the pattern
Tasks to complete after generating the pattern