#!/usr/bin/perl ############################# # Written By: Frank Friedman # Email: frank.e.friedman@jpmchase.com # Date: Aug. 15, 2012 # Summary: ############################# use Data::Dumper; use SOAP::Lite +trace => 'debug'; #use SOAP::Lite; #use JPMC::PIDM; #use Getopt::Std; #use File::Spec; #use Log::Log4perl qw(get_logger :no_extra_logdie_message); use jpmc_wsdl; #my $proxy = 'http://TEST:testing@myid-dev.company.net/rjam-request-service/svc/RequestService/3?wsdl'; my $proxy = 'http://myid-dev.company.net/rjam-request-service/svc/RequestService/3?wsdl'; my $xmlns = "http://myid.company.net/request/service/3"; my $provider = "homeFolderWin"; my $maxLockedTimes=200; my $startingRecord = "1"; my $recordsToRetrieve = "1"; ## Local variables my $action = "setBestMatch"; my $state = "PLACED"; my $recordCount=0; my $response = fetchandlock({ proxy => $proxy, xmlns => $xmlns, first => $startingRecord, max => $recordsToRetrieve, action => $action, state => $state, }); if($response->fault) { $tmp_string = $response->faultstring(); exit; } #=============================== # Password = test = VEVTVElORzp0ZXN0 # userID = TESTING sub fetchandlock { my $zID="TEST"; my $zPW="VEVTVElORzp2ZXN0"; #base 64 encoding my ($args) = @_; # IIS web services expect / as a separator for uri and method. my $lite = SOAP::Lite->new()->on_action(sub { join '/', @_ } ) ->proxy($args->{proxy}); my $response = $lite->call( SOAP::Data->name('fetchAndLock') ->attr({ 'xmlns', $args->{xmlns}}), SOAP::Data->name("first")->value($args->{first}), SOAP::Data->name("max")->value($args->{max}), SOAP::Data->name("action")->value($args->{action}), SOAP::Data->name("state")->value($args->{state}), ); return $response; }