I am using Perl and SOAP::Lite
to pull ticket information from a system called OTRS.
At the moment we have a web service set up on OTRS called GetTicket.
We've managed to get SOAP:Lite
to connect to the web service and pull the ticket information. The ticket information comes back as hash reference.
I am not creating a hash reference inside of the code, that is just what is being returned. How do I pull apart that hash reference if I haven't created it?
At this point we are trying to loop through the hash reference using foreach
. I will post my progress as I go through it, but as usual, any advice is appreciated.
Perl Script
#!perl -w
use SOAP::Lite;
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
use Data::Dumper;
print Dumper(SOAP::Lite
-> proxy('https://ost-otrstest.ostusa.com/otrs/nph-genericinterface.pl/Webservice/Test/GetTicket')
-> GetTicket()
-> result);
Output
$VAR1 = {
'ErrorCode' => 'TicketGet.AuthFail'
'ErrorMessage' => 'TicketGet: Authorization failing!'
};
Press any key to continue...
EDIT: Added dumper and received an authorization error. We do have a user name and password, at this point I'm just not sure where to put that.