CentraSite 10.5 | CentraSite User’s Guide | Runtime Governance | Virtual Service Asset Management | Managing Virtual Service Assets through CentraSite Control | Virtual SOAP Service Management | Configuring Virtual Services | Configuring the Request Processing Step
 
Configuring the Request Processing Step
The Request Processing step specifies how the SOAP request message is to be transformed or pre-processed before it is submitted to the Native Service.
As long as a consumer sends a SOAP request to the correct Virtual Service endpoint, and the request includes a soapAction header, then Mediator can detect the correct service and operation; in this case, no message transformation is required. However, in some cases a Virtual Service might need to transform SOAP messages.
For example, you might need to accommodate differences between the message content that a consuming application is capable of submitting and the message content that a Native Service expects. For example, if the consuming application submits an order record using a slightly different structure than the structure expected by the Native Service, you can use the Request Processing step to transform the record submitted by the consuming application to the structure required by the Web service.
Specifically, you would need to configure the Virtual Service to:
*Transform or pre-process the request messages into the format required by the Native Service, before Mediator sends the requests to the Native Services. Additionally in this case, the transformation is required if the Virtual Service has a schema validation policy, which validates the requests.
*Transform or pre-process the Native Service’s response messages into the format required by the consumer applications, before Mediator returns the responses to the consumer applications.
You can transform or pre-process a message in the following ways:
*By passing the message to an XSLT transformation file.
*By passing the message to a webMethods IS service.
*To configure the Request Processing step
1. In CentraSite Control, go to Asset Catalog > Browse.
2. In the displayed list of asset types, select Virtual Service.
3. In the Assets pane, right-click the Virtual Service you want to configure, and click Details.
The Virtual Service Details page is displayed.
4. In the Processing Steps tab, click Request Processing.
5. In the Request Processing tab, add one or multiple Transform steps, and one or multiple webMethods IS Service steps as follows.
a. Click Add Step.
b. Select one of the following kinds of request processing steps.
Request Processing Step
Description
Transform
Configure this step to perform an XSLT message transformation on the request message before it is submitted to the Native Service.
Important:
The XSL file uploaded by the user should not contain the XML declaration in it (e.g., xml version="1.0" encoding="UTF-8"). This is because when the Virtual Service is deployed to Mediator, Mediator embeds the XSL file in the Virtual Service definition (VSD), and since the VSD itself is in XML format, there cannot be an XML declaration line in the middle of it. This can lead to unexpected deployment issues which can be avoided by making sure the XSL file does not contain the declaration line.
webMethods IS Service
Configure this step to invoke a webMethods IS service to preprocess the request before it is submitted to the Native Service. For more information, see Virtual Service.
c. Click OK.
d. In the Step list, click the step (Transform or webMethods IS Service), and provide the required information for each of the displayed fields:
Request Processing Step
Description
Transform
Click Browse, select the XSLT transformation file from your file system, and click OK.
Note:
If you make changes to the XSLT file in the future, you must re-deploy the Virtual Service.
webMethods IS Service
Type the fully qualified service name or, to display a list of webMethods IS services that are published to CentraSite, type a keyword phrase in the Service field. The wildcard character * is supported. For example, to return all IS services that start with Test, type Test*. (The list that appears also identifies the application server instance on which each service is located.) Then select one or more services to be used to manipulate the request (the axis2 MessageContext instance) and click OK.
Mediator will pass to the invoked IS service the request message context (the axis2 MessageContext instance), which contains the request-specific information. Thus, you can use the public IS services that accept MessageContext as input to manipulate the response contents. For more information, see Virtual Service.
Note:
The webMethods IS service must be running on the same Integration Server as Mediator.
e. Configure additional request processing steps if required, and then click Save.
Note:
Specify the steps in the order in which they should be invoked. Use the arrow buttons to rearrange the sequence of steps. To delete a step, select the check box next to the step and click Delete.