我正在尝试消耗wsdl,我尝试了很多事情,但仍然得到相同的代码,不知道为什么。
基本上,此WSDL需要一些参数,然后它将在
中提供信息查询名称: arireg.lihtandmed_v2
说明:有效的有限数量公司的常规数据(状态查询)
其他信息::自2017年5月1日起使用。按名称搜索时最多返回100个条目。 XSD:http://www2.rik.ee/schemas/xtee6/arireg/live/xroad6_lihtandmed_v2.xsd
错误: SoapFault异常:[HTTP]无法连接到/var/www/public/index2.php:19堆栈跟踪:#0 [内部函数]:SoapClient-> __ doRequest('__ soapCall('lihtandmed_v2',Array )#2 {main}
示例查询:
Sample Query:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xro="http://x-road.eu/xsd/xroad.xsd" xmlns:iden="http://xroad.eu/xsd/identifiers" xmlns:prod="http://arireg.x-road.eu/producer/">
<soapenv:Body>
<prod:lihtandmed_v2>
<prod:keha>
<prod:ariregister_kasutajanimi>kasutajanimi</prod:ariregister_kasutajanimi>
<prod:ariregister_parool>parool</prod:ariregister_parool>
<prod:ariregistri_kood>70000310</prod:ariregistri_kood>
</prod:keha>
</prod:lihtandmed_v2>
</soapenv:Body>
</soapenv:Envelope>
代码:
ini_set('memory_limit','2048');
ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);
ini_set('display_errors',true);
error_reporting(-1);
try {
$options = [
'trace' => true,
'exceptions' => true,
'connection_timeout' => 1
];
$tcs = new SoapClient("https://ariregxmlv6.rik.ee/?wsdl",$options);
$send = $tcs->__soapCall('lihtandmed_v2',[
'parameters' => [
'keha' => array(
"ariregister_kasutajanimi" => 'secretusername',
"ariregister_parool" => 'secretpassword',
"ariregistri_kood" => '70000310'
)
]
]);
print_r($send);
} catch (SoapFault $exception) {
echo $exception;
}