SOAP PHP方法名称包含点字符

时间:2017-07-27 16:13:20

标签: php soap

该方法在名称中包含一个点并给出错误(DB.GetDocListIden),指定此方法名称的正确方法是什么?

$ result = $ client-> DB.GetDocListIdent($ params);



$wsdl = 'productos.wsdl';

try {
    $client = new SoapClient($wsdl);
    $params = ['user' => 'user', 'password' => 'pass'];
    $result = $client->DB.GetDocListIdent($params);
    $productsArray = $result->GetDocListResult->row;

    var_dump($productsArray);

    foreach($productsArray as $product){
        echo '<strong> producto: </strong>' . $product->ItemName;
        echo '<br><br>';
    }
} catch (SoapFault $fault) {
    echo "Fault code: {$fault->faultcode}" . '<br>';
    echo "Fault string: {$fault->faultstring}" . '<br>';
    if ($client != null) {
        $client = null;
    }
    exit();
}
catch(Exception $ex){
    echo $ex->getMessage();
}
$client = null;
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

您可以使用__soapCall,例如:

$client = new SoapClient('');
$client->__soapCall("DB.function", [args]);