DHL返回WebService

时间:2018-04-16 14:47:44

标签: php web-services soap

我的脚本返回此错误,它是dhl soap-client生成标签: SOAP-ERROR:解析WSDL:无法在/kunden/395119_72178/test/some.wsdl'中找到;

我尝试了很多解决方案,但没有任何效果。

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>

谢谢!

0 个答案:

没有答案