获得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