dsfdsfsdf45489 2019-04-28 15:26
浏览 87

WSDL gus api返回错误或空数据。 怎么解决这个问题?

I was trying many times connect to Api wsdl and i don't idea why this code doesn't work.

example query from documentation:

<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: GetMigrationData201901>
 <tem:AuthToken>user key</tem:AuthToken>
 <tem:NIP>
 <arr:string>5840778201</arr:string>
 </tem:NIP>
 </tem: GetMigrationData201901>
 </soapenv:Body>
</soapenv:Envelope>

my code:

$options = array('trace'=>1,
    'exceptions'=> 1,
    'style'=> SOAP_DOCUMENT,
    'use'=> SOAP_LITERAL
);

$soapClient = new SoapClient('https://datastoretest.ceidg.gov.pl/CEIDG.DataStore/services/DataStoreProvider201901.svc?wsdl',$options);
try {



    $versionResponse = $soapClient->GetMigrationData201901(array("tem:AuthToken"=>"abcde12345abcde12345","tem:NIP"=>['arr:string'=>'8252052153']));

} catch (\Exception $e){
    throw new \Exception("Soup request failed! Response: ".$soapClient->__getLastResponse());
}
echo "VERSION RESPONSE: <pre>";
print_r($versionResponse);
echo "</pre><br><br><pre>";
echo 'SOAP CLIENT PRINT: <pre>';
print_r($soapClient);
echo "</pre><br>LAST REQUEST: <pre>";
print_r($soapClient->__getLastRequest());
echo "</pre>";

my result:

request:
[__last_response_headers] => HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Set-Cookie: ASP.NET_SessionId=scsd2k14jytmlrb14l4mnmof; path=/; HttpOnly
X-Powered-By: ASP.NET
Date: Sun, 28 Apr 2019 15:22:49 GMT
Content-Length: 272
response - empty
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 高德地图点聚合中Marker的位置无法实时更新
    • ¥15 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题
    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办