Hi, I am trying to get started with SOAP. I am using mod_perl::Registry, the server script is below.
I want to verify that the number of arguments being passed to the server is correct. In the snip below I presumed all the arguments would be items with @_ but it looks like all the arguments are in list within $_[1]. When a client connects to the service, the logs show: 2. Test 2. /home/phil/edits/finished/MFM 1020/2501602.tif, 220123 So it looks like the first argument is always the service and the 2nd item is a comma separated list of the other arguments. Does anyone know if this is the correct behaviour? Thanx, Dp. #!/usr/bin/perl use strict; use warnings; use SOAP::Transport::HTTP; use File::Basename; use File::Copy; SOAP::Transport::HTTP::CGI ->dispatch_to('Test') ->handle; package Test; sub ReNameTiff{ my ($path,$num); # Check the number of arguments. Must be 2; my $no_args = @_; if ($no_args != 2) { return "Not enough arguments, expected at two"; } else { ($path,$num) = @_; } # Check the file exists foreach my $arg (@_) { print STDERR "$no_args. $arg\n"; } if (-e $path) { } else { return "Cannot find $path, @_"; } my $basename = basename($path); (my $splnum = $num) =~ s/\///; return "basename renamed to $num"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/