Skip to content

Instantly share code, notes, and snippets.

@p-alik
Created March 18, 2019 16:47
Show Gist options
  • Save p-alik/4f2b48ba379faeca8e48662f0da5ffe9 to your computer and use it in GitHub Desktop.
Save p-alik/4f2b48ba379faeca8e48662f0da5ffe9 to your computer and use it in GitHub Desktop.
Trace OTRS TicketSearch Request
use v5.10;
use strict;
use warnings;
use SOAP::Lite (+trace => "all");
my $proxy = "https://domain/otrs/rpc.pl";
my $soap = SOAP::Lite->new(proxy => $proxy);
my ($user, $pw) = (qw/foo bar/);
$soap->uri("/Core");
my @arg = (
SOAP::Data->new(name => "Username", value => $user),
SOAP::Data->new(name => "Password", value => $pw),
SOAP::Data->new(name => "Object", value => "TicketObject"),
SOAP::Data->new(name => "Method", value => "TicketSearch"),
SOAP::Data->new(name => "Param1_Name", value => "TicketID"),
SOAP::Data->new(name => "Param1_Value", value => "561141"),
);
my $som = $soap->call("Dispatch", @arg);
if ($som->fault) {
die $som->faultstring;
}
else {
say $som->result;
}
@p-alik
Copy link
Author

p-alik commented Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment