1

I am doing web service testing by importing the WSDL using UFT API testing. I am placing request content in text mode and running the test and it returned a successful response. How can I read an xml file and send as a request during run time using custom code. I tried the code below but when I ran the test the request being sent was blank and so the response failed.

I'm using the code below,

public void StServiceCallActivity4_OnBelowGenerateRequest(object sender, HP.ST.Ext.WebServicesActivities.ActivityProcessXmlMessageEventArgs args)
        {
            //TODO: Add your code here...
            this.StServiceCallActivity4.InputEnvelope.LoadXml(@"C:\\TestRequest.xml"); 


        }

I appreciate your help.

Thanks Abhi

Abhi
  • 11
  • 2

1 Answers1

0

Have you tried the same code inside the AfterGenerateRequest event ?

Below is the article explaining this (Section Assign a specific request file to a test step)

http://uft-help.saas.hpe.com/en/12.54/UFT_Help/Content/User_Guide/task_API_coding_manipulate_WSC_properties.htm