iOS中的SOAP请求

时间:2012-05-06 16:49:07

标签: ios soap

我有这个SOAP请求,我在php中使用它来获取一些信息,但我似乎无法弄清楚如何在Xcode中做到这一点,希望有人可以指出我正确的方向

<?php
$wsdl_url = "https://www.service.com/mySoapService.wsdl";
$client = new SoapClient($wsdl_url);
var_dump($client->__getFunctions());

try {
    $userName = 'myUsername';
    $password = 'myPassword';
    $result = $client->retrieveUsage(new SoapParam(array("UserId" => $userName, "Password" => $password), "RetrieveUsageRequestType"));

    print '<pre>';
        print_r($result);
    print '</pre>';
} catch (Exception $e) {
    echo $e->getMessage();
}
?>

2 个答案:

答案 0 :(得分:3)

添加您的WSDL,创建存根,然后开始使用iOS应用程序中的Web服务。

http://sudzc.com/

我希望这就是你要找的东西。

享受!

答案 1 :(得分:0)

我使用http://easywsdl.com来生成类。与我的WS完美配合