Passing parameter to SOAP Web Service Requests Using Visual Studio Team System 2008
Posted
by Nicholas
on Stack Overflow
See other posts from Stack Overflow
or by Nicholas
Published on 2010-06-11T07:26:58Z
Indexed on
2010/06/11
7:33 UTC
Read the original article
Hit count: 713
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
© Stack Overflow or respective owner