【发布时间】:2016-08-16 06:34:30
【问题描述】:
我在自定义门户中更新 otrs 票证时遇到问题。我通过 Soap Api 使用 PHP。这是我尝试过的一些事情。 我创建了一个网络服务。 在 OTRS 作为提供者,网络传输,我添加了命名空间https://otrs.classic.com.np/otrs/GenericInterface/actions .
$url = "https://myurl.com/otrs/nph-genericinterface.pl"; // URL for OTRS server
$namespace = "https://myurl.com/otrs/GenericInterface/actions";
$username = "ctdeveloper"; // SOAP username set in sysconfig
$password = "ctdeveloper"; // 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' => $namespace,
'trace' => 1,
'login' => $username,
'password' => $password,
'style' => SOAP_RPC,
'use' => SOAP_ENCODED
)
);
#### Create a new ticket shell. The function returns the Ticket ID ####
$TicketUpdate = $client->__soapCall(
"Dispatch", array($username, $password,"ctdeveloper",
"TicketObject", "TicketUpdate",
"TicketID", $ticket_id,
"OwnerID", $new_owner,
)
);
【问题讨论】:
-
您能重新表述您的问题并修正一些错别字吗?您的要求不是很清楚。