Passing parameter to SOAP Web Service Requests Using Visual Studio Team System 2008
- by Nicholas
How can I pass in the current datetime parameter to a SOAP request? I know you can pass in parameters by adding a datasource to the web test project and reference it like this {{DataSource.TableName.FieldName}}.
But I want to pass in current datetime parameter as a dynamic value (something like DateTime.Now). How do I go about doing this? Below is sample SOAP request that I put into String Body:
<soap:body>
<MyQuery xmlns="http://something.com">
<req>
<QueryType>{{DataSource.Table.QueryType}}</QueryType>
<Name>{{DataSource.Table.Name}}</Name>
<RequestDateTime>{{insert DateTime.Now here}}</RequestDatetime>
</req>
</MyQuery>
</soap:body>
P.S. Running web test by adding Web Service Request in Visual Studio Team System 2008