Web Service event structure
Relevant for: API testing only
This topic describes the additional events available that correspond with the unique run structure of a Web service call.
These are relevant when working with both Web service call steps or SOAP Request steps.
Web service event structure diagram
The following diagram shows how each event works within the individual test step run:
Due to the flow and timing of the various events, we recommend creating event handlers only for specific events.
Event reference
The following events correspond with the unique run structure of a Web service call:
-
AfterExecuteStepEvent
-
AfterGenerateRequest
-
AfterProcessRequestAttachments
-
AfterProcessRequestSecurity
-
BeforeApplyProtocolSettings
-
BeforeExecuteStepEvent
-
BeforeProcessResponseAttachments
-
BeforeProcessResponseSecurity
-
BeforeSaveResponse
-
CodeCheckpointEvent
-
OnConstructRawRequest
-
OnReceiveResponse
-
OnSendRequest
OnConstructRawRequest
Purpose: Access the request's full envelope, enabling you to manipulate all properties needed.
Use the RawRequest property to access the request envelope.
Accessible Properties: The full request envelope information for the current step.
BeforeExecuteStepEvent
Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step
Accessible Properties:
-
Input properties/parameters from the current activity
-
User/test variables from the current test
-
Output properties from a previous test step or a parent activity
AfterExecuteStepEvent
Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step
Accessible Properties:
-
Input properties/parameters from the current activity
-
User/test variables from the current test
-
Output properties from a previous test step or a parent activity
-
Response data from the current step
-
Response attachments from the current step
CodeCheckpointEvent
Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step
Accessible Properties:
-
Input properties/parameters from the current activity
-
User/test variables from the current test
-
Output properties from a previous test step or a parent activity
-
SOAP Fault properties
AfterGenerateRequest
Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step
Accessible Properties:
-
Input properties from the current step
-
The input envelope from the current step
-
The input attachments from the current step
-
Asynchronous properties from the current step
AfterProcessRequestSecurity (WCF services only)
Purpose: Update the request envelope information for Web services using a WCF security scenario with WSE defined. For details on the WCF security scenarios, see Security scenarios.
Use the args.Message property to access the response envelope
Accessible Properties:
-
Input envelope information for the current test.
OnReceiveResponse
Purpose: Access the output envelope for the current test for Web services using a Web Service security scenario with WSE defined. For details on the WCF security scenarios, see Security scenarios.
Use the arg.Message property to access the response envelope
Accessible Properties:
-
The response envelope information for the current step. When this runs, the Web service call step returns a byte array containing the response envelope. You must add event handler code also to use the byte array data.
Use the arg.Message property to access the response envelope
BeforeProcessResponseSecurity (WCF Security Scenarios only)
Purpose: Access the output envelope for the current step for Web services using a WCF security scenario with WSE defined. For details on the WCF security scenarios, see Security scenarios.
Use the arg.Message property to access the response.
Accessible Properties:
-
The response envelope information for the current step.
BeforeSaveResponse
Purpose: Access the current step's response.
Accessible Properties:
-
The response for the current step. Use the arg.Message property to access the response.
See also: