nusoap生成WSDL文件报错

WBOY
發布: 2016-06-06 20:36:40
原創
1213 人瀏覽過

这个错误,感觉很莫名其妙的,哪位大哥给看看?谢谢!
补充一下:这个使用了NuSoap的库
nusoap生成WSDL文件报错

<code><?php require_once 'lib\nusoap.php';
function getProd($category)
{
    if ($category == "books") {
        return join(",", array(
            "The WordPress Anthology",
            "PHP Master: Write Cutting Edge Code",
            "Build Your Own Website the Right Way"
        ));
    } else {
        return "No products listed under that category";
    }
}
$server = new soap_server();
$server->configureWSDL("productlist", "urn:productlist");
$server->register("getProd",
    array("category"=>"xsd:string"),
    array("return"=>"xsd:string"),
    "urn:productlist",
    "urn:productlist#getProd",
    "rpc",
    "encoded",
    "Get a listing of products by category");
$server->service($HTTP_RAW_POST_DATA);
</code>
登入後複製
登入後複製

回复内容:

这个错误,感觉很莫名其妙的,哪位大哥给看看?谢谢!
补充一下:这个使用了NuSoap的库
nusoap生成WSDL文件报错

<code><?php require_once 'lib\nusoap.php';
function getProd($category)
{
    if ($category == "books") {
        return join(",", array(
            "The WordPress Anthology",
            "PHP Master: Write Cutting Edge Code",
            "Build Your Own Website the Right Way"
        ));
    } else {
        return "No products listed under that category";
    }
}
$server = new soap_server();
$server->configureWSDL("productlist", "urn:productlist");
$server->register("getProd",
    array("category"=>"xsd:string"),
    array("return"=>"xsd:string"),
    "urn:productlist",
    "urn:productlist#getProd",
    "rpc",
    "encoded",
    "Get a listing of products by category");
$server->service($HTTP_RAW_POST_DATA);
</code>
登入後複製
登入後複製

你没有设置变量$HTTP_RAW_POST_DATA.你可以试着设置一下:

<code>php</code><code>$HTTP_RAW_POST_DATA = isset ( $HTTP_RAW_POST_DATA ) ? $HTTP_RAW_POST_DATA : '';
</code>
登入後複製
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板