Action()
{
web_add_header("SOAPAction", "http://WebXml.com.cn/getWeather");
soap_request("StepName=Sample Soap Request",
"ExpectedResponse=AnySoap",
"URL=http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx",
"SOAPEnvelope= "
"<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://WebXml.com.cn/">
"
" <soapenv:Header/>
"
" <soapenv:Body>
"
" <web:getWeather>
"
" <!--Optional:-->
"
" <web:theCityCode>792</web:theCityCode>
"
" <!--Optional:-->
"
" <web:theUserID></web:theUserID>
"
" </web:getWeather>
"
" </soapenv:Body>
"
"</soapenv:Envelope>",
"ResponseParam=Response",
LAST);
lr_convert_string_encoding(lr_eval_string("{Response}"),LR_ENC_UTF8,LR_ENC_SYSTEM_LOCALE,"ResponseUTF8");
lr_output_message("Response is : %s",lr_eval_string("{ResponseUTF8}"));
lr_xml_get_values("XML={Response}",
"ValueParam=getResult",
"Query=/soap:Envelope/soap:Body/getWeatherResponse/getWeatherResult/string",
LAST);
lr_output_message(lr_eval_string("weatherResult = {getResult}"));
return 0;
}