WsSetResultItem
This action will associate the keys(xpath or tags) to the values from the response to the DCO objects to which you want to assign them. If the source already exists its corresponding target will be replaced with the new target value.
Syntax
bool WsSetResultItem (string source, string target)Parameters
- source
- The xpath or tags to find the value in the result. Smart parameters are supported.
- target
- Destination item to assign the value.
Returns:
True, if the action succeeds. Otherwise, False.Level
All levels.Details
This action must be set before calling the response. Use this action if you want to get more than a single value from the response.Example 1
WsSetParameter("FromCurrency", "USD", false)
WsSetParameter("ToCurrency", "GBP", false)
WsSetResultItem("double", "@B.ConversionRate")
WsGetvalues("http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?", "", "", "", "", "")
Example 2
WsSetResultItem("@STRING(rates.USD)", "@B.EUR2USD")
WsSetResultItem("@STRING(rates.GBP)", "@B.EUR2GBP")
WsGetvalues("http://api.fixer.io/latest?", "", "", "", "", "JSON", "")