#! /usr/bin/perl use strict; use lib '/var/www/perl-bin'; use SOAP::Transport::HTTP; print STDERR ("service called\n"); SOAP::Transport::HTTP::CGI -> dispatch_to('testSoap') -> handle; exit(0);
As you can see I get both to print to STDERR when they are called so I can see in the apache logs. but the module never gets called. Thanks againpackage testSoap; use DBI; sub get{ print STDERR "module called\n"; my ($self,$id) = @_; my $userinfo = { ID => 0, first => '', surname => '', age => 0, phone => '' }; if ($id != 0 ){ my $dbh = DBI->connect('DBI:mysql:CF:' . '127.0.0.1', '<username> +', '<password>'); my $sth = $dbh->prepare("select * from user where id=$id"); $sth->execute; my $stuff= $sth->fetchrow_hashref; if ($stuff){ $userinfo->{ID} = $stuff->{id}; $userinfo->{first} = $stuff->{firstname}; $userinfo->{surname} = $stuff->{surname}; $userinfo->{age} = $stuff->{age}; $userinfo->{phone} = $stuff->{phone}; } } return $userinfo; } 1;
In reply to Re^4: SOAP::Lite with client using service
by jammin
in thread SOAP::Lite with client using service
by jammin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |