#!/bin/perl -w
# --
# scripts/rpc-example.pl - soap example client
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: rpc-example.pl,v 1.7 2009/12/22 11:19:52 mb Exp $
# --
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU AFFERO General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# or see http://www.gnu.org/licenses/agpl.txt.
# --

use strict;
use warnings;

my $Debug = 1;

# config
use SOAP::Lite( 'autodispatch', proxy => 'http://192.168.0.11/otrs/rpc.pl' );
my $User = 'some_user';
my $Pw   = 'some_pass';

my $RPC = Core->new();

my %stateList = $RPC->Dispatch( $User, $Pw, 'LinkObject', 'TypeList', UserID => 47 );

print "size of hash:  " . keys( %stateList ) . ".\n";

while ( my ($key, $value) = each(%stateList) ) {
	my $value = $stateList{$key};
	print "$key => $value\n";
}
    
print "done.\n"; 
 
exit 0;
