Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试使用php概述soap时出错_Php_Xml_Web Services_Soap - Fatal编程技术网

尝试使用php概述soap时出错

尝试使用php概述soap时出错,php,xml,web-services,soap,Php,Xml,Web Services,Soap,您好,我在soap中有一些请求,但在我的网站中尝试该请求时出现了一些错误 致命错误:在第14行的/home/loraclec/public_html/pick5.php中对非对象调用成员函数Body() 请求: <?php /** define the SOAP client using the url for the service**/ $SoapiClient = new soapclient('http://14.141.212.201/ConRsltAPI/Result.asmx

您好,我在soap中有一些请求,但在我的网站中尝试该请求时出现了一些错误

致命错误:在第14行的/home/loraclec/public_html/pick5.php中对非对象调用成员函数Body()

请求:

<?php
/** define the SOAP client using the url for the service**/
$SoapiClient = new soapclient('http://14.141.212.201/ConRsltAPI/Result.asmx?WSDL', array('trace' => 1));
$lStrCred = "GI2304CON15";
$lStrGameName = "PICK3";
$lstrStatus = "0";
$thearray = array(
    'lStrCred' => $lStrCred,
    'lStrGameName' => $lStrGameName, 
    'lstrStatus' => $lstrStatus
);
$result = $client->Body($thearray);

if (is_soap_fault($result)):

    echo '<h1>ERRROR</h1><pre>';

    print_r($result);

    echo '</pre>';

else:

    echo '<h1>Working FINE</h1><pre>';

    print_r($result);

    echo '</pre>';

endif;

// see the last SOAP request
echo htmlspecialchars($client->__getLastRequest(), ENT_QUOTES);

// print the SOAP response
echo htmlspecialchars($client->__getLastResponse(), ENT_QUOTES);

/** lets store the login token just in case we want to use it for later use**/

$token = $result->token;

?>

$client
在第14行中不存在。更改:


$client
在第14行中不存在。更改:


尝试更改
$result=$client->Body($thearray)带有
$result=$client->ConAPI\u RSLT($thearray)是否应该
$client
不是
$SoapiClient
?尝试更改
$result=$client->Body($thearray)带有
$result=$client->ConAPI\u RSLT($thearray)第14行的
$client
是否应该是
$SoapiClient
?您好,谢谢您的回答,但我还有一个问题,当我运行代码时,我会返回主页。链接--->您好,谢谢您的回复,但我还有一个问题,当我运行代码时,我会返回主页。链接--->
$result = $client->Body($thearray);
$result = $SoapiClient->Body($thearray);