我正在尝试在我的 IOS 应用程序中使用 WSDL Webservice。我已经用谷歌搜索了几天,但无法从服务器获取数据。我的服务 URL 类似于http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL。
我想知道如何创建soapMessage 和soap Action。以下代码是否必须创建 WSDL 解析
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<soap:Envelope \n"
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" \n"
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
"xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" \n"
"soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" \n"
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> \n"
"<soap:Body> \n"
"<CelsiusToFahrenheit xmlns=\"http://tempuri.org/\">\n"
"<Celsius>23</Celsius>\n"
"</CelsiusToFahrenheit>\n"
"</soap:Body> \n"
"</soap:Envelope>
如果有样品请分享给我
对于android,我们使用了Ksoap2并成功获取数据
谢谢