DWLServiceController

DWLServiceController is the entry point for InfoSphere® MDM.

The DWLServiceController is a stateless session bean that the client application uses to access the service remotely and enable distributed transaction management.

DWLServiceController provides the following method:
public Serializable processRequest(HashMap context, Serializable request)

The method throws a DWLResponseException error, if the exception occurs because of underlying components.

The first input parameter, HashMap context, contains a name-value pair of context properties which are used by the Request and Response Framework to handle the request appropriately. Depending on the values contained in HashMap context, a different request handler, parser factory, parser, and constructor factory construction are used. The following properties are used by the system:

  • TargetApplication: specifies the application to which this request is sent. The only value supported is tcrm, which signifies InfoSphere MDM as the target application.
  • RequestType: drives the selection of a request handler and parser factory. To use the standard request handler and parser factory that comes with the core product, use the value standard.
  • Parser: selects the parser for the current request. To use the standard XML parser to parse InfoSphere MDM XML requests, use the value TCRMService.
  • ResponseType: selects the type of constructor factory. To use the standard factory that comes with the core product, use the value standard.
  • Constructor: selects the constructor to use for the response. To use the standard constructor that returns the InfoSphere MDM response XML, use the value TCRMService .
  • OperationType: an optional property that is used by the standard request handler to perform the specific operation instead of the full processing. Possible values include Parse, Process, and All. The default value is All. Using the Parse property, the request handler only performs the parsing step, using the Process property it skips parsing but performs the processing and construction, and using the All property, it completes all the steps.
  • ASI_Request: selects the Adaptive Services Interface (ASI) definition that is required to process requests. There should be a corresponding entry in the ASIDEFINITION table whose ASI_NAME field matches with the value set in this ASI_Request property. The entry in the ASIDEFINITION table should have the TRANSFORM_TP_CD value set to 1.
    Note: This value should be provided only if requests need to be processed by the ASI framework.
  • ASI_Response: selects the Adaptive Services Interface (ASI) definition that is required to process responses. There should be a corresponding entry in the ASIDEFINITION table whose ASI_NAME field matches with the value set in this ASI_Request property. The entry in the ASIDEFINITION table should have the TRANSFORM_TP_CD value set to 2.
    Note: This value should be provided only if requests need to be processed by the ASI framework.

Using the Parser and Constructor keys in HashMap context, the client application can determine which parser is to be invoked and which constructor to use to construct the expected response. For example, the client can send a request in TCRMService XML format and expect a response in an ACORD XML format.

These properties work in conjunction with the Request and Response Framework configuration, so ensure that the properties passed in are mapped in the DWLCommon.properties configuration file. All standard plug-ins are defined in the configuration. If you require values other than the standard ones, then make the appropriate changes to the configuration. Also, to support sending additional properties, you must configure a custom request handler, parser, or constructors depending upon individual property.

The second processRequest() input parameter, Serializable request, represents the request data to be processed. Any object that implements the Serializable interface can be passed as request data. It is up to the parser to parse this object and create data structures for the target application. For example, XML can be passed in this parameter as a String and the appropriate XML parser parses the XML and creates Java™ objects to be used as input data.

The return value from the method is also any object that implements a Serializable interface. For example, in the case of an XML, it can be a String containing the XML response. The following sample of the DWLCommon.properties configuration file shows how the property values are mapped to the appropriate types:
###############################
# Default value for TargetApplication if one is not supplied.
TargetApplication=tcrm

###############################
# RequestType
#
# RequestType.<TargetApplication property value>.<RequestType property value>
#
# The key without the Parser property value can be used to define the devault value if nothing was supplied.
#
RequestType.tcrm.standard=com.dwl.base.requestHandler.DWLRequestHandler
RequestType.tcrm=com.dwl.base.requestHandler.DWLRequestHandler
Some settings are used with DWLCommon.properties, and some are used to look up the appropriate OSGi service. For parsers, those are described in the Parse request topic, and for constructors, those are described in the Response constructors topic. For general information, see Introduction to OSGi services.

The method throws a DWLResponseException error, if the exception occurs because of underlying components.