I am at my wits end and I am sure that it is something that I am missing. So let me describe what I am trying to resolve.
We recently made the move form OTRS 4 to OTRS 6. In the environment of OTRS 4 we had a .php webform that allowed for an anonymous user to create a ticket. This form used the RCP.pl interface to make the ticket.
Now the problem in OTRS 6 that interface no longer has the same functionality as it did before. This is forcing us to move to the GenericInteface.pl to make the connection. I cannot seem to get the existing webform to work with that interface. The .php applet looks like:
Code: Select all
$url = "http://<FQDN>/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnector"; // URL for OTRS server $namespace = "http://<FQDN>/otrs/TicketConnector"; //Namespace in Webservice Configuration $username = "<USER>"; $password = "<PASSWORD>"; $typeID = 2; // id from ticket_type table $queueID = 2; // id from queue table $priorityID = 1; // id from ticket_priority table $ownerID = 2; // id from users table $title = $_POST[title]; $severity = $_POST[severity]; $description = "First Name: " . $_POST [cust_fn] . "\n" . "Last Name: " . $_POST [cust_ln] . "\n" . "Company Name: " . $_POST [cust_cn] . "\n" . "Phone Number: " . $_POST [cust_pn] . "\n" . "Product: " . $_POST [cpcprs] . "\n" . "Version: " . $_POST [cpcpv] . "\n" . "Type: " . $_POST [cpcpt] . "\n" . "Issue: " . $_POST [title] . "\n" . "Description: " . $_POST[description] ; $email = $_POST[cust_ema]; $queue = $_POST[cpcprs]; $Operation = "TicketCreate" $XMLData=array("UserLogin", $username,); $client = new \SoapClient( null, array( 'location' => $url, 'uri' => $namespace, 'trace' => 1, 'style' => SOAP_RPC, 'use' => SOAP_ENCODED, ) ); $msg=array(new SoapParam($username, 'ns1:UserLogin'), new SoapParam($password, 'ns1:password'), new SoapParm(Array( 'CustomerUser'=> $from, 'PriorityID'=> $priorityID, 'Queue'=> $queue, 'State'=> 'new', 'Title'=> $title, ), 'ns1:Ticket'), new SoapParam(Array( 'Body'=> $description, 'ContentType'=> 'text/plain; charset=ISO-8859-1', 'Subject'=> $title, ),'ns1:Article'), ); $answer = $client->_soapCall('TicketCreate',$msg); print_r($answer);