Php DHL退货网络服务
我的脚本返回此错误,dhl soap客户端将生成标签: SOAP-ERROR:解析WSDL:在“/kunden/395119_72178/test/some.WSDL”中找不到 我尝试了很多解决方案,但都没有效果Php DHL退货网络服务,php,web-services,soap,Php,Web Services,Soap,我的脚本返回此错误,dhl soap客户端将生成标签: SOAP-ERROR:解析WSDL:在“/kunden/395119_72178/test/some.WSDL”中找不到 我尝试了很多解决方案,但都没有效果 try { $opts = array( 'http' => array( 'user_agent' => 'PHPSoapClient' ) ); $context = stream_cont
try {
$opts = array(
'http' => array(
'user_agent' => 'PHPSoapClient'
)
);
$context = stream_context_create($opts);
$wsdlUrl = '/kunden/395119_72178/test/some.wsdl';
$soapClientOptions = array(
'stream_context' => $context,
'cache_wsdl' => WSDL_CACHE_NONE
);
$client = new SoapClient($wsdlUrl, $soapClientOptions);
print_r($client);
}
catch(Exception $e) {
echo $e->getMessage();
}
和xml文件:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:var="https://amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3bl">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken> <wsse:Username>ws _online _retoure</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile1.0#PasswordText">Anfang1!</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<var:BookLabelRequest
portalId="OnlineRetoure"
deliveryName="Spanien_Var3"
shipmentReference="ShipRef Nextt"
customerReference="1.Feld via Webservice"
labelFormat="PDF"
senderName1="Willi Webservice"
senderName2="via Webservice"
senderCareOfName=" careOfName"
senderContactPhone=" 0800 123456"
senderStreet="Webservice Street"
senderStreetNumber=" 8080"
senderBoxNumber="12"
senderPostalCode="28010"
senderCity="Madrid" />
</soapenv:Body>
ws_在线检索
安防1号!
谢谢大家! 您需要在$wsdlUrl中提供完整的url,而不仅仅是path@DimitrisKontoulis,我检查此项并得到此错误:“SOAP-error:解析WSDL:在“”中找不到”