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.

Back to top

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

Back to top

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.

Back to top

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

Back to top

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

Back to top

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

Back to top

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

Back to top

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.

Back to top

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

Back to top

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.

Back to top

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.

Back to top

See also: