This chapter discusses how to:
Access the Service Operation Tester
Select a service operation to test.
Populate message data.
Save message test data.
Clone and delete record structures.
Override target connector properties
Invoke test service operation.
View test service operation results.
Clear service operation test data.
Understanding the Service Operation Tester UtilityThe Service Operation Tester utility enables you test service operations and invoke the following service operation types using the utility:
Asynchronous One-Way.
Asynchronous Request/Response.
Asynchronous-to-Synchronous.
Synchronous.
You can use the utility to populate messages contained within a service operation,
Prerequisites for Using the Service Operation Tester UtilityBefore you can use the Service Operation Tester Utility you create a service operation and save it in the database.
Common Elements Used in This Chapter|
Convert Tree to XML |
Click the button to convert data stored in the tree structure into XML format. |
|
Default Version |
The Service Operation Tester tests the default version of a service operation. If you are testing a non-default version, the transform version page will be displayed. |
|
Future-Dated Publication |
Check the box to test future-dated asynchronous service operations. |
|
IB Info Values |
Click the link to override target connector properties. |
|
Invoke Operation |
Click the button to invoke the service operation. |
|
Message Version |
The version of the request message. |
|
New Tree Structure |
Click the button to clear the record and field values in the tree structure. |
|
Operation Type |
Displays the operation type of the selected service operation. |
|
Provide XML |
Click the button to input XML or upload XML data from a file. |
|
Returned Message/Result |
The returned message or results from the test. Displays when you click the Execute Event button. |
|
Return to Search |
Click the link to return to the Operation Tester Search page and search for an operation to test. |
|
Service |
The service that contains the service operation to use for the test. |
|
Service Operation |
The service operation to use for the test. |
|
Use DB Operation Transaction |
Use this button to populate the input message with an existing database transaction. |
|
View Returned IB Info Values |
Displays the IBInfo values that were returned from the test. |
Accessing the Service Operation Tester UtilityTo access the Service Operation Tester utility, select PeopleTools, Integration Broker, Service Utilities, Service Operation Tester. The following graphic shows the Service Operation Tester utility:
Selecting Service Operations to Test
To select a service operation to test:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
The Operation Tester Search page appears.
Select a service operation by performing one of the following:
Click the Search button to display a list of all service operations defined in the database. Click the name of the service operation to test. The Service Operation Tester page appears.
In the Service field, enter all or part of the name of the service that contains the service operation to test. Click the Lookup button. A list of all services in the database that match the search criteria you entered display.
If you enter nothing in the Service field and click the Lookup button, a list of all services in the database appears.
Click the name of a service that contains the service operation to test. Click the Search button to display all service operations that belong to the service.
Click the name of the service operation to test. The Service Operation Tester page appears.
In the Service Operation field, enter all or part of the name of the service operation to test. Click the Lookup. A list of all service operations in the database that match the search criteria you entered display.
If you enter nothing in the Service Operation field and click the Lookup button, a list of all service operations in the database appears.
Click the name of the service operation to test. Click the Search button to display all service operations that contain the search string you entered.
Click the name of the service operation to test. The Service Operation Tester page appears.
Specifying Future-Dated Asynchronous Service OperationsThe Service Operation Tester utility enables you to test future-dated asynchronous service operations.
If you select an asynchronous service operation, a Future Dated Publication box appears on the Service Operation page.
Check the Future Dated Publication box if the service operation you want to test is future-dated.
Populating Message Data
This section describes how to populate message data in the Service Operation Tester utility. This section discusses how to:
Manually enter XML to populate message data.
Upload XML from files to populate message data.
Manually enter field values to populate message data, including PSCAMA record values and audit actions.
Populate rowset-based message parts in container messages.

Understanding Populating Message DataYou can load message data into a message definition from the following sources.
XML that manually enter.
XML that you upload from a file.
Field values that you manually enter, including PSCAMA record values and audit actions.

Manually Entering XML to Populate Message DataThis section describes how to:
Manually enter XML data into rowset-based message definitions.
Manually enter XML data into nonrowset-based message definitions.
Manually Entering XML Data into Rowset-Based Message Definitions
When you manually enter XML data into a rowset-based message, the tree view is not available. To work with message data in the tree view, you must manually populate field values.
To manually populate a rowset-based message definition:
Access the Enter XML page. (Select PeopleTools, Integration Broker, Service Utilities. Click the Provide XML button.
In the XML text box enter XML to populate the message definition.
Click the OK button.
The Service Operation page appears and the XML you entered displays in the Input Message box.
Manually Entering XML Data into Nonrowset-Based Message Definitions
To manually populate a nonrowset-based message definition, on the Service Operation page, enter XML directly into the Input Message box.
To access the Input Message box, select PeopleTools, Integration Broker, Service Utilities, Service Operation Tester.
Note that you can also click the Provided XML button and enter XML in the XML text box for a nonrowset-based message definition.

Uploading XML Data from Files to Populate Message DataThis section describes how to upload XML data from files to populate rowset-based and nonrowset-based message definitions.
Prerequisites for Uploading XML Data from Files
To successfully upload files into the Handler Tester the following environment variables must be set:
PS_FILEDIR
PS_SERVDIR
Note. PS_SERVDIR is set when you run PSAdmin. Before running PSAdmin, set the PS_SERVDIR environment variable.
This section describes how to set the PS_FILEDIR variable in Windows and UNIX environments.
To set the PS_FILEDIR variable in Windows:
Close any open DOS windows.
On your desktop, right-click the My Computer icon and click Properties.
The System Properties dialog appears.
Click the Advanced tab.
In the Environment Variables section, click the Environment Variables button. The Environment Variables dialog box appears.
In the User variables for <user name> section, click New.
A New User Variable dialog box displays.
In the Variable Name field enter PS_FILEDIR.
In the Variable Value field, enter c:\<path>.
The path you specify is the location from where the system will upload files.
Click OK to exit the Environment Variables dialog box.
Click OK again to exit the System Properties dialog box.
To set the PS_FILEDIR variable in UNIX use one of the following commands as appropriate for your UNIX environment:
export PS_FILEDIR = <PS_HOME>/file
setenv PS_FILEDIR = <PS_HOME>/file
The path you specify is the location from where the system will upload files.
Note. Use the same procedure to set PS_SERVDIR.
Uploading XML Data from Files
To upload XML data from a file to populate message definition data:
Access the Enter XML page. (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester. Click the Provide XML button.
From the File Encoding drop-down list, select the file encoding of the file you are uploading. The options are:
Non-encoded.
UTF-8.
UTF-16.
Click the Upload XML from File button.
Click the Browse button to locate the XML file to upload.
Click the Upload button.
Click the OK button to return to the Service Operation page.

Manually Entering Field Values to Populate Message DataThis section discusses how to:
Manually enter message definition field values.
Assign PSCAMA record values and audit actions to Level 0 records.
Assign PSCAMA audit actions to Level 1 and greater records.
Understanding Manually Entering Field Values
After you specify a service operation and version for a rowset-based message, the Handler Tester displays the message definition record and field structure in a tree format.
You can populate the message definition by manually entering values for fields.
In addition you can specify PSCAMA record values and audit actions for Level 0 records, as well as PSCAMA audit actions for Level 1 and greater records.
Manually Entering Message Definition Field Values
To manually enter field value data:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
In the tree structure for the message definition, single-click on field name to populate.
A dialog box for the field opens that displays field length and field type information as a guide for entering values.
Enter a value for the field.
Click the OK button.
Values you enter display after the field name in the tree view. The tree shows the first 30 characters of an entered value; however, the entire field value is stored.
See Saving Message Data.
Assigning PSCAMA Values and Audit Actions to Level 0 Records
To assign PSCAMA values and audit actions to Level 0 records:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Populate the service operation with a rowset-based message.
In the tree view, click the Level 0 record.
The Select an Action page appears.
Click the Assign PSCAMA arrow to expand the section.
Enter PSCAMA values as appropriate.
Descriptions of the PSCAMA field values and audit actions are described in the PeopleSoft Integration Broker PeopleBook.
See PSCAMA.
Click the OK button.
Assigning PSCAMA Audit Actions to Level 1 and Greater Records
To assign PSCAMA audit actions to Level 1 and greater records:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Populate the service operation with a rowset-based message.
In the tree view, click a Level 1 or greater record.
The Select an Action page appears.
Click the Assign PSCAMA arrow to expand the section.
From the Action field, section the appropriate audit action.
Descriptions of PSCAMA audit actions are described in the PeopleSoft Integration Broker PeopleBook.
See PSCAMA.
Click the OK button.

Assigning PSCAMA Record Values and Audit Actions to RecordsThis section discusses how to:
Assign PSCAMA values and audit actions to Level 0 records
Assign PSCAMA audit actions to Level 1 and greater records
Understanding Assigning PSCAMA Record Values and Audit Actions
For service operations that contain rowset-based messages, the Service Operation Tester enables you to populate PSCAMA record values at Level 0 and PSCAMA audit action options at every other level of the rowset, based on the message definition.
Populating Rowset-Based Message Parts in Container MessagesThe Service Operation Tester utility enables you to populate rowset-based message parts in container messages.
When you select a container message with which to work in the utility, a Container Message Builder link appears on the Service Operation Tester page. The following example shows the Service Operation page with a service operation select that contains a container message that contains rowset-based message parts:
The example shows that the service operation IB_EX_MP_ROWSET_SYNC is selected to test. The service operation contains the message IB_EX_ROWSET_CONTAINER, which is a container message comprised of rowset-based message parts.
When you select the Container Message Builder link, the Container Message Page (IB_MSGCONTAINER) appears, as shown in the following example:
The example shows the first message part contained in the message container, IB_EX_ROWSET_PART1.V1. At the bottom of the page is the familiar tree structure for building out rowset-based messages. You use the same pages as you would to build out any rowset-based message.
Use the backward and forward arrows to navigate to the different message parts in the message.
In between the navigation arrows, the system displays the part on which you are working, and the total number of parts in the container message. This example shows that the Container Message Builder page is displaying message part one and that a total of two parts comprise the container message.
The procedures for creating and modifying rowset-based messages are described in detail elsewhere in PeopleBooks.
See Managing Rowset-Based Messages.
Saving Message DataThis section discusses how to:
Save data located in the tree view.
Save manually-entered XML data.

Saving Data Located in Tree ViewsTo save test data loaded or entered into a tree view:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Click the Convert Tree to XML button.
The Service Operation Tester converts the data to XML format and displays it in the Input Message window.
Cut and paste the XML into an editor or your choice and save the file.
You can later import the data back into the Service Operation Tester by uploading the XML file back into the utility.
Note. You can also use this method to create and save a test message to use with other integration testing utilities such as Send Master.
See Uploading XML Data from Files to Populate Message Data, Using the Send Master Utility.

Saving Manually-Entered XML DataTo save XML test data that you have manually entered into the utility:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Cut or copy the XML data in the Input Message box and copy it into an editor or your choice.
Save the file.
You can later import the data back into the Service Operation Tester by uploading the XML file back into the utility.
Cloning and Deleting Record Structures
This section discusses how to:
Clone record structures.
Delete record structures.

Cloning Record StructuresIn some cases, you will want to add additional nodes to a record/field tree structure.
For example, if you are testing a purchase order, the records in the tree might be ORDER_HEADER and ORDER_LINE. If you want to test with two or more lines, you can click the first occurrence of the record name ORDER_LINE to duplicate that portion of the tree and all child records and nodes.
To clone a record structure:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
In the tree view, single-click the record to clone.
The Select An Action dialog box appears.
Select Clone Record Structure.
Click the OK button.
The original record is duplicated, along with child nodes and all entered field values. If you clone a record in error, single-click the record again and delete the record structure.

Deleting Record StructuresTo delete a record structure:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
In the tree view, single-click the record to delete.
Select Delete Record Structure.
Click the OK button.
Overriding Target Connector Properties
This section discusses how to:
Specify target connectors.
Specify target connector properties.

Specifying Target ConnectorsYou can specify a target connector and target connector properties you have defined at the connector, node and routing definition level when you test service operations.
For example, suppose that there are different query string arguments that would normally come into the system in the URL of an HTTP Get. The PeopleCode that handles the incoming service operation would have to obtain the query string arguments from the message's IB Info object. In the Service Operation Tester, you can supply these values on the IB Info page.
To select a target connector:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Click the IB Info Values link.
In the Connector Property Defaults section, select the target connector. The options are:
Connector. Click the Lookup button and select the connector ID.
Node. Click the Lookup button and select the node.
Routing. Click the Lookup button and select the routing from which to load connector properties.
Click the Load Connector Properties button.

Specifying Connector PropertiesAfter you load the defined connector properties you can modify and add new values for testing purposes.
Connector properties you add or modify here do not override the properties you may have defined at the gateway, or node levels. However, when you run a service operation test, the PeopleCode runs based on the values you define here and the Service Operation Tester writes the results to the database—and all PeopleCode database changes are permanent.
You can modify and add values for the following items:
|
Connector Name |
Specify the proper name of the target connector to invoke to send the message. |
|
Connector Class Name |
Specify the class name of the target connector to invoke. |
|
Remote Framework URL |
Specify the URL (as a string) to which to send a message. This value overrides the server URL. |
|
Path Info |
Specific to incoming HTTP requests. This is the path information extracted from the request. |
|
Cookies |
Specific to incoming HTTP requests. This is cookie string found when the request was received by the HTTP listening connector. |
|
App Server Domain |
Enter the name of the application server domain to use. |
|
Synch Server Timeout |
Specify the timeout period (in seconds) for a transaction at runtime. The default synchronous timeout period is 300 (five minutes). |
|
Property Name/Value/Property Type |
Add or modify connector property names, values and types. |
|
Name/Value |
Add or modify parameter names and values to send to the target system in the URL, if the external system can use query string parameters as input. |
Invoking Test Service OperationsAfter you have selected the service operation to test and have set up the integration metadata, you can invoke the test service operation.
When you invoke an asynchronous service operation type, for example, asynchronous one-way, asynchronous request-response, or asynchronous-to-synchronous, the system invokes the service operation using the Publish method.
When you invoke a synchronous service operation type, the system invokes the service operation using the SyncRequest method.
To invoke a service operation in the Service Operation Tester:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Click the Invoke Operation button.
Viewing Test Service Operation ResultsThe Service Operation Tester returns test results in the Returned Message/Result section of the Service Operation page and in the Returned IB Info page.

Viewing Results in the Return Message/Results SectionWhen you click the Invoke Operation button, the Service Operation Tester invokes the service operation.
If the test is success the system displays a message that the service operation was published and also provides a transaction ID. The following example show a typical message the system displays when a service operation is successfully invoked:
Published. Transaction ID - fb779f7c-51bc-11dc-9567-c6308e318606.
If an error occurs during the invocation, an error message will display in the Return Message/Results section.

Viewing Results in the Returned IB Info PageIf you specified target connector properties, you can view returned IBInfo information. To do so, on the Service Operation page, click the View Returned IB Info Values link.
Depending on the input values for an event test and the PeopleCode content, some or all of the fields contain test data.
The fields on that display on this page are described earlier in this chapter.
See Overriding Target Connector Properties.
Clearing Service Operation Test DataThis section describes how to:
Clear rowset-based message data.
Clear nonrowset-based message data.

Clearing Rowset-Based Message DataTo clear rowset-based message data:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
Click the New Tree Structure button.
All values for the input message are cleared from the message definition, and you can repopulate it as desired.

Clearing Nonrowset-Based Message DataTo clear nonrowset-based message data:
Access the Service Operation page (PeopleTools, Integration Broker, Service Utilities, Service Operation Tester).
In the Input Message box, delete the XML.
You can repopulate the message definition as desired.