How to Create a Simulator Definition that Supports Chatty Services

Creating and Modifying Simulator Definitions 5-11 soap:Envelope cavs:CAVSResponseOutput_1 cavs:CAVSResponseOutput_2 soap:Envelope xmlns:soap=http:schemas.xmlsoap.orgsoapenvelope soap:Body xmlns:ns1=http:xmlns.oracle.comSimpleProcess ns1:SimpleProcessProcessResponse . . . ns1:SimpleProcessProcessResponse soap:Body soap:Envelope cavs:CAVSResponseOutput_2 cavs:CAVSResponseOutputs Envelope text is prepopulated. Enter actual message content within appropriate tags provided within the envelopes. After entering request and response data sets and clicking the Generate Xpath button on the Modify Simulator Definition page, the XPath Selection grid provides access to available XPath values and enables you to select the XPaths that must be treated as key nodes. For more information about the Modify Simulator Definition page, see Section 5.2, How to Modify a Simulator Definition. If your testing scenario includes test definitions, you can likewise create test definitions that contain multiple request and response message sets that work with the sets defined in your simulator definition. For more information, see Section 4.3, How to Provide Multiple Request and Response Message Sets in a Single Test Definition.

5.4 How to Create a Simulator Definition that Supports Chatty Services

You can create a simulator definition that can simulate multiple services, each with a different schema. In general, we recommend that you create simulators that simulate a single specific service. However, in the case of chatty conversations, for the ease of maintenance, you may choose to simulate all callouts of an Application Business Connector Service ABCS using a single simulator definition. Using this method, you have the advantage of using one simulator for a particular ABCS, regardless of the number of callouts that need to be made. This method also provides ease of maintenance because linked callouts can all be viewed and modified in one place. For example, in some integration scenarios, participating applications do not provide services at the same level of granularity as operations in Enterprise Business Services EBSs. In these scenarios, a requester ABCS may need to adopt patterns such as message enrichment, splitting, and aggregation and disaggregation as required by an EBS. Likewise, a provider ABCS may need to adopt patterns as required by participating application services. These ABCSs, which are typically implemented using BPEL process, call out to several services. To test this chatty ABCS using CAVS, there will likely be a need to replace the services that the ABCS calls out to with several simulators. It will also be required that these multiple requestresponse simulators be correlated, so that they accurately emulate the transaction of the same entity. When this type of simulator is called, CAVS initiates the following general flow: 5-12 Infrastructure Components and Utilities Users Guide 1. Selects simulator definition. 2. Validates the first request message based on the selected simulator. 3. Returns the appropriate response message, if the selected simulator is a two-way simulator. 4. Repeats steps 2 and 3 until the chatty service conversation is complete. Request Message Format Use the format shown in Example 5–3 to create a simulator definition that supports chatty service conversations. This format provides the ability to specify a set of request and response messages, along with success criteria for each of them. This format is the same as that used for multiple requests and responses in a simulator definition. However, in this case, the schemas for each set will be different. Example 5–3 Request Message Format cavs:CAVSRequestInputs xmlns:cavs=http:schemas.xmlsoap.orgcavsrequestenvelope cavs:CAVSRequestInput_1 soap:Envelope xmlns:soap=http:schemas.xmlsoap.orgsoapenvelope soap:Body xmlns:ns1=http:xmlns.oracle.comService1 ns1:Service1Request . . . ns1: Service1Request soap:Body soap:Envelope cavs:CAVSRequestInput_1 cavs:CAVSRequestInput_2 soap:Envelope xmlns:soap=http:schemas.xmlsoap.orgsoapenvelope soap:Body xmlns:ns2=http:xmlns.oracle.comService2 ns2: Service2Request . . . ns2: Service2Request soap:Body soap:Envelope cavs:CAVSRequestInput_2 Once you have provided request and response messages, click the Generate Xpath button on the Modify Simulator Definition page to generate XPath values. Modify the generated XPath values, if necessary. For more information about the Modify Simulator Definition page, see Section 5.2, How to Modify a Simulator Definition. When this type of simulator is called, separate simulator instances are created for each request and response pair. The evaluation of actual response versus expected response is handled per instance created for the same simulator definition.

5.5 How to Send Dynamic Responses in a Simulator Response