1

サンプルリクエスト:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://ws.intermedia.net/Account/Management">

<soapenv:Header>
  <AuthentificationInfo>
     <login>[PLRAdminUserName]</login>
     <password>[PLRAdminPassword]</password>
     <accountID>[accountID]</accountID>
  </AuthentificationInfo>
</soapenv:Header>
<soapenv:Body>
  <GetAccount>
     <accountID>[accountID]</accountID>
  </GetAccount>
</soapenv:Body>
</soapenv:Envelope>

WSDL: https://controlpanel.msoutlookonline.net/WebServices/Account/AccountService.asmx?WSDL

PHP:

    ini_set("soap.wsdl_cache_enabled", "0");

    $wsdl = "https://controlpanel.msoutlookonline.net/WebServices/Account/AccountService.asmx?WSDL";
    $ns = 'https://ws.intermedia.net/Account/Management';

    $client = new SoapClient($wsdl, array(
        "trace" => 1,
        "exceptions" => 0
    ));

    $login = 'xxxx';
    $password = 'xxxx';
    $partnerID = 1234;
    $accountID = 12345678;

    $headerBody = array('AuthentificationInfo'=>array(
        'login' => $login,
        'password' => $password,
        'accountID' => $partnerID
    ));
    $header = new SoapHeader($ns, 'AuthentificationInfo', $headerBody);
    $client->__setSoapHeaders($header);
    $client->__soapCall("echoVoid", array(null));

    $value = $client->GetAccount($accountID);

次のエラー メッセージが表示されます。

soap:ServerServer was unable to process request. ---> Access denied; Code: 0x0008

誰でもコードに問題があることがわかりますか?

4

3 に答える 3

5

試してみてください

     $headerBody = array(
      'login' => $login,
      'password' => $password,
      'accountID' => $partnerID);
于 2013-09-17T21:55:42.480 に答える
2

これに遭遇する可能性のある他の人のために:

私が変更され

$ns = 'https://ws.intermedia.net/Account/Management';

に:

$ns = 'http://schemas.msoutlookonline.net';
于 2015-07-21T14:41:51.427 に答える