开发者

error with my first SOAP Web services in PHP

I'm getting this error, any one can help me here?

<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>WSD</faultcode>
<faultstring>
SOAP-ERROR: Parsing WSDL: Couldn't load from 'db.wsdl' : failed to load external entity "db.wsdl"
</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SO开发者_如何学JAVAAP-ENV:Envelope>

here is my PHP code

<?php

function getRot13($pInput){
$rot = str_rot13($pInput);return($rot);
}

function getMirror($pInput){
$mirror = strrev($pInput);

return($mirror);
}

// turn off the wsdl cache
ini_set("soap.wsdl_cache_enabled", "0");
$server = new SoapServer("db.wsdl", array('soap_version' => SOAP_1_2));


$server->addFunction("getRot13");
$server->addFunction("getMirror");
$server->handle();
?>


Error says the exact problem - you are missing correct path to WSDL file. In your case, you have given "db.wsdl" as a path, that appearantly does not exist. Confirm that "db.wsdl" is inside your script directory or default include directory (configured in PHP configs).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜