魔兽世界私有服务器SOAP问题


World of Warcraft Private server SOAP problems

你好,我的魔兽世界私人服务器有一些问题。Worldserver是魔兽世界私人服务器的控制台,在Worldserver上,我试图使用SOAP功能从我的网站发送命令到Worldserver,但是当我尝试使用它时,我得到了这个错误:

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Method'ns1:executeCommand'未实现:方法名称或命名空间未实现C:'Users'SERVER'Desktop'CrusaderWoW'Server'XAMPP'htdocs'index.php:33堆栈跟踪:#0C:'Users'SERVER'Desktop'Crusader哇' Server ' XAMPP '根' index . php (33):SoapClient->__call('executeCommand', Array) #1C:'Users'SERVER'Desktop'Crusader哇' Server ' XAMPP '根' index . php (33):SoapClient->executeCommand(Object(SoapParam)) #2 {main}抛出C:'Users'SERVER'Desktop'Crusader ' WoW'Server'XAMPP'htdocs'index.php on线33

您可以自己访问当你尝试创建一个帐户时,你会得到错误。

这是我的index.php代码:

<?php
if(isset($_POST['submit'])) {
$soapUsername = 'bredegard';
$soapPassword = '123';
$soapHost = '127.0.0.1';
$soapPort = '7878';
$dbhost = "127.0.0.1";
$dbuser = "root";
$dbpass = "ascent";
$dbname = "realmd";
error_reporting(E_ALL);
$username = $_POST['username'];
$password = $_POST['password'];
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
$sql = "SELECT * FROM account WHERE username = '" . $_POST['username'] . "'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
} else {
$client = new SoapClient(NULL, array(
    'location' => "http://$soapHost:$soapPort/",
    'uri'      => 'urn:TC',
    'style'    => SOAP_RPC,
    'login'    => $soapUsername,
    'password' => $soapPassword,
));
$command = "account create " . $username . " " . $password . "";
$result = $client->executeCommand(new SoapParam($command, 'command'));
}
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
    </head>
    <body>
        <form action="" method="POST" autocomplete="off">
            <input type="password" style="display:none;">
            <input type="text" name="username" placeholder="username">
            <input type="password" name="password" placeholder="password">
            <input type="submit" name="submit" value="Submit" name="submit">
        </form>
    </body>
</html>

你没有在php.ini文件中启用soap,打开它并搜索soap删除;在它前面。