我有这个 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();
}
?>