简体   繁体   English

Mantis SOAP mc_issue_update

[英]Mantis SOAP mc_issue_update

im trying to manipulate mantis bt with soap api via nusoap 我试图通过nusoap用肥皂api操纵螳螂bt

here is code example im trying to update and issue 这是我试图更新和发布的代码示例

<?php
require_once('nusoap-0.9.5/lib/nusoap.php');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');

$WSDL_POINT = "http://test_test_test/api/soap/mantisconnect.php";
$username = 'user';
$password = 'pass';
$issue_id = 500;
$project_id = 5;


$params_update = array (
    'username' => $username,
    'password' => $password,
    'issueId ' => $issue_id,
    'issue' => array (
        'id' => 3890500,
        'summary' => 'test test test',
        'project'=>array('id'=>$project_id),
        'status' => array (
            'id' => 10,
            'name' => 'resolved'
            ),
    )
);


$client = new nusoap_client($WSDL_POINT, false);
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;

$result = $client->call('mc_issue_update', $params_update, 'http://test_test_test/api/soap/mantisconnect.php', 'testtest');



echo "<pre>";
print_r ($result);
echo "</pre>";

?>

Running my script results in empty array response, and issue wasnt updated, at the same time i'm having no problems with mc_issue_get, im getting response array with issue data. 运行我的脚本导致空数组响应,并且问题没有更新,同时我对mc_issue_get没有任何问题,即时获取带有问题数据的响应数组。

Please help me find out whats wrong with this code. 请帮我查一下这段代码的错误。

Problem resolved during debug output, using code: 使用代码在调试输出期间解决问题:

echo "Request:\\n"; echo“请求:\\ n”; echo $client->request."\\n\\n\\n"; echo $ client-> request。“\\ n \\ n \\ n”;

echo "Response:\\n"; 回声“回应:\\ n”; echo $client->response."\\n"; echo $ client-> response。“\\ n”;

description and summary fields in issue array are must have during query. 问题数组中的描述和摘要字段在查询期间必须具有。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM