I am trying to consume a web service that I created via Remedy Admin tool that creates a tickets, it works with SoapScope and other utilties, problem is I dont know how to send the ARAuthenticate header (username,password) so I get a no write access error. Here is my php code if that helps,
Code:
<?php
ini_set("include_path", '/var/www/html/pear_includes/' . PATH_SEPARATOR . ini_get("include_path"));
require "HTML/QuickForm.php";
include "db_connection.inc";
require "HTML/wil_custom.php";
require_once 'SOAP/Client.php';
$test = array('userName'=>'Willy Lipford','password'=>'1soret','authentication'=>'','locale'=>'','timeZone'=>'');
$header_ns = '{http://remedy03.corp.tnsi.com/arsys/WSDL/remedy03/HD_AccountRequest}ARAuthenticate';
$auth_header = new SOAP_Header($header_ns,'string',$test,0);
print_r($auth_header);
echo "################\n";
$client = new SOAP_Client('http://remedy03.corp.tnsi.com/arsys/services/ARService?server=remedy03&webService=HD_AccountRequest',0);
$client->addHeader($auth_header);
$method='Create';
$params=array('E-Mail_Updates'=>'Yes',
'Full_DescriptionOfRequest'=>'TESTING WEBSERVER SUBMIT',
'ReportedProblemCategory'=>'Crystal Enterprise',
'ReportedRequestType'=>'Create User Account',
'RequestClass'=>'Application',
'Requestor'=>'Willy Lipford',
'UserAccount'=>'George Castanza',
'Status'=>'New',
'Tickettype'=>'Task',
'RequestTypeDescription'=>'Create Crystal Enterprise login account');
$new=& new SOAP_Value('{http://remedy03.corp.tnsi.com/arsys/WSDL/remedy03/HD_AccountRequest}Create','string',$v=$params);
echo "################\n";
print_r($new);
echo "################\n";
$options=array('namespace'=>'urn:HD_AccountRequest',
'soapaction'=>'urn:HD_AccountRequest/Create',
'style'=>'document',
'use'=>'literal',
'userName'=>'Willy Lipford',
'password'=>'1soret');
$res=$client->call($method,$v=array('Create'=>$new),$options);
if(PEAR::isError($res)) {
echo "Error: ".$res->getMessage()."\n";
}
else {
print_r($res);
}
What the heck is going on.... here is my error... oh btw - this is ars 5.1.2 on linux doing mid-tier 6.0.
Error:
MessageType: 2
MessageNum: 8932
MessageText: You do not have write license
AppendedText:
MessageType: 2
MessageNum: 332
MessageText: You do not have write access (at create time) to field
AppendedText: 536870986
Any idea what is going on!! please help!
Thanks,
Willy Lipford