尝试使用php概述soap时出错
您好,我在soap中有一些请求,但在我的网站中尝试该请求时出现了一些错误 致命错误:在第14行的/home/loraclec/public_html/pick5.php中对非对象调用成员函数Body() 请求:尝试使用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
<?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)第14行的code>是否应该$client
不是$SoapiClient
?尝试更改$result=$client->Body($thearray)代码>带有$result=$client->ConAPI\u RSLT($thearray)代码>第14行的$client
是否应该是$SoapiClient
?您好,谢谢您的回答,但我还有一个问题,当我运行代码时,我会返回主页。链接--->您好,谢谢您的回复,但我还有一个问题,当我运行代码时,我会返回主页。链接--->
$result = $client->Body($thearray);
$result = $SoapiClient->Body($thearray);