Hi, I'm just doing my first steps in trying to communicate with OTRS through RPC/SOAP.
I've created this short script for testing, which is derived from the rpc- example.pl distributed by OTRS (2.2.6). ##################### #!/usr/bin/perl -w use Data::Dumper; #config use SOAP::Lite('autodispatch', proxy => 'http://myhost:4880/otrs/rpc.pl'); my $User = 'foo'; my $Password = 'bar'; my $RPC = Core->new(); print "NOTICE: TicketObject->TicketGet(TicketID => 2008052025000017)\n"; my %Ticket = $RPC->Dispatch($User, $Password, 'TicketObject', 'TicketGet', TicketID => 2008052025000017); print "NOTICE: Ticket Number is: $Ticket{TicketNumber} \n"; print Dumper \%Ticket; ##################### The result when running this script on the client is: ./test-rpc.pl NOTICE: TicketObject->TicketGet(TicketID => 2008052025000017) Use of uninitialized value in concatenation (.) or string at ./test-rpc.pl line 14. NOTICE: Ticket Number is: $VAR1 = {}; The server reports this in Apache's error.log: [Thu Aug 28 18:49:18 2008] rpc.pl: Variable "%CommonObject" will not stay shared at /var/www/localhost/otrs-2.2.6/bin/cgi-bin/rpc.pl line 81. A user in #perlde (irc.perl.org) this is caused by using ModPerl::Registry which I can confirm. My Apache2 config looks like this: ##################### <IfModule mod_perl.c> Perlrequire /var/www/localhost/otrs-2.2.6/scripts/apache2-perl-startup.pl PerlModule Apache2::Reload PerlInitHandler Apache2::Reload PerlModule Apache2::RequestRec <Location /otrs> ErrorDocument 403 /otrs/index.pl SetHandler perl-script PerlResponseHandler ModPerl::Registry Options +ExecCGI PerlOptions +ParseHeaders PerlOptions +SetupEnv Order allow,deny Allow from all </Location> </IfModule> ##################### The user on #perlde suggested to move all 'subs' from rpc.pl into an external module, but as rpc.pl is distributed this way by OTRS and I'm surely not the only one using rpc.pl together with ModPerl::Registry, there must be a way to get this running. Does anyone know how to solve this problem? Best regards & thanks in advance, Elias P.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support or consulting for your OTRS system? => http://www.otrs.com/