[rt-devel] More SOAP

David Sarno david.sarno at yale.edu
Fri Mar 16 17:55:17 EST 2001

Hi.  I'm using RT and attempting to build a SOAP system to wrap
around some of the RT commands.  The first thing I'm trying to do is to
create a ticket.  I'm using SOAP to directly call the Ticket->Create()
method, and passing it the required hash of arguments.  The following
client code faults with an error saying that it can't find the Method
'Load' in RT::User.  Does this strike anyone as an obvious misuse of the
object/method syntax?  The modules are all in /home/rt/lib/RT, but I don't
think I'm telling the compiler where to find them correctly. Sorry for
asking about such a little problem

#!/usr/bin/perl -w

use SOAP::Lite;
use lib '/home/rt/lib';
use diagnostics;

my %args = (id => 1,
                Queue => "testqueue",
                Requestor => undef,
                RequestorEmail => undef,
                Type => 'ticket',
                Owner => RT::User->Load('das56'),  # ***Problem Line***
                Subject => '[no subject]',
                InitialPriority => "0",
                FinalPriority => "0",
                Status => 'new',
                TimeWorked => "0",
                Due => "0",
            MIMEObj => undef);

my $s = SOAP::Lite
   ->on_debug(sub{print STDERR @_})

print $s->result();

Secondarily, I'm an undergrad compsci major and part of my senior project
(building an update mechanism for a library database) is figuring out how to
interface a database and RT using SOAP.  I'm trying to figure out the
cleanest possible way of creating a SOAP wrapper around a few of the key RT
functions.  If the bare-bones way that I've tried above strikes anyone as
right or wrong, I'd really like to hear your ideas.  I'm not an expert
hacker, so I'm trying to figure out a fairly simple yet functional way to
build this stuff.  Someone suggested simply creating a soap client that made
system calls to the CLI, but I'm concerned about security issues that might
go along with it.

Thanks very much.


More information about the Rt-devel mailing list