SOAP-ERROR:解析WSDL:无法从' wsdl'加载:无法加载外部实体" wsdl"

时间:2017-04-12 07:20:11

标签: php web-services soap wsdl

$params = array (
     "AccountName" => $_POST['comp-name'],
     "DBA" => $_POST['DBA'],
     "Comment" => $_POST['comments']
 );

$options = array(
        'soap_version'=>SOAP_1_1,
        'trace'=>1,
        'exceptions'=>1
    );
    $context = stream_context_create($options);
try {
$soap = new 
    SoapClient('https://application.cloud.clickandpledge.com/Signup.svc?wsdl', $options);
    $soapParams = array('instruction'=>$params);         
    $response = $soap->AccountSignUp($soapParams);
}
catch(Exception $e) {
    die($e->getMessage());
}

var_dump($response);

我上面要使用我的WSDL文件来代码片段与SOAP连接,我的屏幕中出现以下错误...

SOAP-ERROR:解析WSDL:无法从' http://application.cloud.clickandpledge.com/Signup.svc?wsdl=wsdl0'加载:未能加载外部实体" http://application.cloud.clickandpledge.com/Signup.svc?wsdl=wsdl0"

1 个答案:

答案 0 :(得分:0)

您似乎没有正确的WSDL网址。我发现的是:

https://paas.cloud.clickandpledge.com/PaymentService.svc?wsdl

对于您的SOAP调用,您将调用" PaymentService"服务。它看起来并不像clickandpledge.com允许通过SOAP注册。你可能必须通过他们的网页这样做。

HTH, 吉姆