Web-Service from OTRS

English! place to talk about development, programming and coding
Post Reply
Taty
Znuny newbie
Posts: 1
Joined: 21 Dec 2010, 19:07
Znuny Version: 3

Web-Service from OTRS

Post by Taty »

Hi,

I am very new to OTRS and Perl as well :). I have two problems. Please Help me!
1) We want to call Web-Services from OTRS instead of connecting to company's DBs. Is it possible in general?
I am trying in Kernel/Config.pm in a place where we build insert query to call this Perl script:

Code: Select all

use HTTP::Request::Common;
$ua = LWP::UserAgent->new;
$ua->request(POST 'http://_host_/index.php', [foo => 'bar', bar => 'foo']);
system('php '.$ua);
after that I try to add new Customer by Customer form and get this kind of error.
Software error:
Undefined subroutine &Kernel::System::CustomerUser::DB::_ConvertTo called at /opt/otrs//Kernel/Config.pm line 594.

Not really sure what does it mean and how I can call any webService and give some parameters to it per post.

2) another one problem is that I cannot write into file with this code:

Code: Select all

open(file, ">>/home/developer/vhosts/local.otrs.de/htdocs/foobar.txt");
print file "First line\n";
print file "Second line\n";
close (file);
After executing I get the same Error:
Software error:
Undefined subroutine &Kernel::System::CustomerUser::DB::_ConvertTo called at /opt/otrs//Kernel/Config.pm line 594.

I am very thankful for any your help!
Tatyana
Post Reply