1
我在更新所有者以及更新故障單時遇到問題。我在PHP中使用soap api。 我正在使用OTRS 3.1.12。 我嘗試使用以下。所有者更新OTRS
$url = "https://url/otrs/rpc.pl"; // URL for OTRS server
$username = "username"; // SOAP username set in sysconfig
$password = "password"; // SOAP password set in sysconfig
### Form Fields
$new_owner =$_POST['new_owner'];
$subject =$_POST['subject'];
$text = $_POST['text'];
$note_type = $_POST['note_type'];
#### Initialize new client session ####
$client = new SoapClient(
null,
array(
'location' => $url,
'uri' => "Core",
'trace' => 1,
'login' => $username,
'password' => $password,
'style' => SOAP_RPC,
'use' => SOAP_ENCODED
)
);
#### Create a new ticket shell. The function returns the Ticket ID ####
$TicketID = $client->__soapCall(
"Dispatch", array($username, $password,
"TicketObject", "TicketCreate",
"TicketID", $ticket_id,
"OwnerID", $new_owner,
"UserID", 1,
)
);
##### Create an article with the info. The function returns an Article ID ####
$ArticleID = $client->__soapCall("Dispatch",
array($username, $password,
"TicketObject", "ArticleCreate",
"Subject", $subject,
"ContentType", "text/plain; charset=ISO-8859-1",
"Body", $text,
)
);
這是完全錯誤的,我知道。誰能幫忙?