Xml
Hello im trying to get your MOD working correctly and im having trouble. When I try and open a new ticket here is the error im getting
Fatal error: Uncaught SoapFault exception: looks like we got no XML document in /home/matest/public_html/sandbox/junkcars/add.php Stack trace: #0 /home/matest/public_html/sandbox/junkcars/add.php(25): SoapClient->__call('ostTicket.open', Array) #1 {main} thrown in /home/matest/public_html/sandbox/junkcars/add.php on line 25
Here is the code im using to add
<?php
$osticket = new SoapClient('api/soap/index.php?wsdl');
// Set up the parameters
$args = array(
'username' => 'admin1',
'password' => 'xxx',
'ticketData' => array(
'name' => utf8_encode('sir Test'),
'email' => utf8_encode('some@email.com'),
'subject' => utf8_encode('testing'),
'message' => utf8_encode('this is a message'),
'topicId' => 1, //topic Website Support
'deptId' => 1, //department Sales
'staffId' => null,
'duedate' => null,
'time' => null,
'pri' => 2, // default priority
'phone' => null,
)
);
try {
// Send the request and receive the ticketID
$result = $osticket->__call('ostTicket.open',$args);
}
catch (SoapFault $e) {
throw $e;
}
?>
And when I try and run this I get a warning log in my admin panel saying
SOAP: openTicket failed
Opening a ticket from 22.33.144.145 failed
Not really sure what im doing wrong at this point. Im using osticket 1.7
Any help would be greatly appreciated!