wrote:
> Amer Neely <> wrote:
>> I need to update a script on one server with data from a form on another
>> server. It has been suggested that SOAP would work for this. I've never
>> used SOAP, and am overwhelmed with the number of 'SOAP*' modules on
>> CPAN. I've read that perhaps I should use a language with better support
>> for SOAP (PHP ?) but the existing script is in Perl and I'd prefer to
>> stick with that if possible.
>
> It sounds like the tail is wagging the dog. For one thing, you probably
> shouldn't update scripts based on form submissions. Why not update some
> database that the script accesses? That would probably solve the problem
> right there. But if you want Perl script-to-Perl script communication,
> pick a protocol that Perl is good at, rather than picking a random protocol
> and then figure out to implement in Perl.
>
> Xho
>
Sounds like good advice. However the 'other script' is not in my
control, and I'm not even sure it is Perl - likely PHP. The owner is the
one looking for a SOAP solution. They are asking for an XML document of
the form data.
At present the form data is not being saved in a database, so that is
not an immediate solution, although I could present that to my client
and the 3rd party.
I have managed to get some headway on some test scripts. But an error
message is confusing me.
The server code:
#! /usr/bin/perl
## test using SOAP to display values from another script
BEGIN
{
open (STDERR,">>$0-err.txt");
print STDERR "\n",scalar localtime,"\n";
}
use strict;
use warnings;
use lib '/home/softouch/public_html/cgi-bin/PerlMods/SOAP-0.28/blib/lib';
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('ShowMe')
-> handle;
package LarMar;
sub ShowMe
{
my $incoming = shift;
return "$incoming\n";
}
######################################
The error:
Can't locate SOAP/Transport/HTTP.pm in @INC (@INC contains:
/home/softouch/public_html/cgi-bin/PerlMods/SOAP-0.28/blib/lib
/usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl/5.6.2 /usr/lib/perl5/site_perl .) at
larmar_server.pl line 14.
BEGIN failed--compilation aborted at larmar_server.pl line 14.
#######################################
It seems that it is looking for HTTP.pm, but HTTP is a directory under
SOAP/Transport. CGI.pm is in the HTTP directory.
This is modified from a script in the SOAP::Lite distribution.
--
Amer Neely
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"