獲得PHP日期我有一個SOAP Web服務和PHP的一個問題。我嘗試使用一種方法連接到服務器。我需要搜索和結果「整容」的價值。 首先,我的代碼是:從SOAP Web服務
$wsdl = 'https://datastoretest.ceidg.gov.pl/CEIDG.DataStore/Services/NewDataStoreProvider.svc?singleWsdl';
$data = array(
"AuthToken" => "xxx",
"NIP" => "6332212511"
);
$soap = new SoapClient($wsdl, array('trace' => true, 'exception' => true));
$response = $soap->__soapCall("GetMigrationDataExtendedAddressInfo", $data);
print_r($resopnse);
和錯誤看起來像
的SOAPFault例外:一:DeserializationFailed]格式化 拋出一個異常,而試圖反序列化消息:發生錯誤 反序列化操作 內容請求消息「GetMigrationDataExtendedAddressInfo」。預計最終的元素 「身體」命名空間「http://schemas.xmlsoap.org/soap/envelope/」。 元素中找到「參數1」命名空間「」。 2號線,在 176位置..
當和嘗試:
$soap->__getTypes();
$soap->__getFunctions();
結果是:
Array
(
[0] => struct GetID {
string AuthToken;
dateTime DateFrom;
dateTime DateTo;
dateTime MigrationDateFrom;
dateTime MigrationDateTo;
}
[1] => struct GetIDResponse {
string GetIDResult;
}
[2] => struct GetMigrationDataExtendedAddressInfo {
string AuthToken;
ArrayOfstring NIP;
ArrayOfstring REGON;
ArrayOfstring NIP_SC;
ArrayOfstring REGON_SC;
ArrayOfstring Name;
ArrayOfstring Province;
ArrayOfstring County;
ArrayOfstring Commune;
ArrayOfstring City;
ArrayOfstring Street;
ArrayOfstring Postcode;
dateTime DateFrom;
dateTime DateTo;
ArrayOfstring PKD;
ArrayOfint status;
ArrayOfstring UniqueId;
dateTime MigrationDateFrom;
dateTime MigrationDateTo;
}
[3] => struct GetMigrationDataExtendedAddressInfoResponse {
string GetMigrationDataExtendedAddressInfoResult;
}
[4] => int char
[5] => duration duration
[6] => string guid
[7] => struct ArrayOfstring {
string string;
}
[8] => struct ArrayOfint {
int int;
}
)
Array
(
[0] => GetIDResponse GetID(GetID $parameters)
[1] => GetMigrationDataExtendedAddressInfoResponse GetMigrationDataExtendedAddressInfo(GetMigrationDataExtendedAddressInfo $parameters)
[2] => GetIDResponse GetID(GetID $parameters)
[3] => GetMigrationDataExtendedAddressInfoResponse GetMigrationDataExtendedAddressInfo(GetMigrationDataExtendedAddressInfo $parameters)
)
我有包膜和搜索結果爲 「NIP」 信息從這個Web服務的文檔(但我不知道如何使用它):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/"
xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soapenv:Header/>
<soapenv:Body>
<tem:GetMigrationDataExtendedAddressInfo>
<tem:AuthToken>xxx</tem:AuthToken>
<tem:NIP>
<arr:string>6332212511</arr:string>
</tem:NIP>
</tem:GetMigrationDataExtendedAddressInfo>
</soapenv:Body>
</soapenv:Envelope>
那麼,什麼
與錯? :(請幫助我解決這個問題
我覺得應該是'$響應= $肥皂 - > __的SOAPCall(「GetMigrationDataExtendedAddressInfo」,陣列($數據)); – Amir
'是。它正在工作,但是「沒有幹帳」。所以,可能問題是將參數作爲$ data發送。 AuthToken沒問題,因爲服務讓我進來。 – MateuszRyaN
你要解決這個問題?此外,我得到的消息「沒有用戶帳戶」 – danny3b