I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-03-12 18:44:47-08 by needhelpbad
Need help with SOAP Lite WSDL project
Hi,

I have been working on a soap client project for over a week now and can not figure out what I am doing wrong. I am not an expert using Perl or SOAP so any help would be "greatly" appreciated. Here is what I have put together so far.


sub procgetmemberinfo {

my $pin = "$form{'lPin'}";
my $password = "$form{'sPassword'}";

my $soap = SOAP::Lite
-> uri('https://xmlsql.XXXXX.xxx:441')
-> on_action( sub { join '/', 'https://xmlsql.XXXXX.xxx:441', $_[1] } )
-> proxy('https://xmlsql.XXXXX.xxx:441/service.asmx?WSDL');

my @params = (
SOAP::Data->name(lPin => $pin),
SOAP::Data->name(sPassword => $password)
);

my $method = SOAP::Data->name('GetMemberInfo')->attr({xmlns => 'https://xmlsql.XXXXX.xxx:441/'});

my $result = $soap->call($method => @params);
unless ($result->fault) {

my $title = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/TITLE');
my $firstname = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/FIRST');
my $middlename = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/MIDDLE');
my $lastname = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/LAST');
my $suffix = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/SUFFIX');
my $address1 = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/STREET_ADDRESS');
my $address2 = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/ADDRESS2');
my $city = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/CITY');
my $stateprovince = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/STATE_PROV');
my $postalcode = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/ZIP');
my $country = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/COUNTRY');
my $homephone = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/HOME_PHONE');
my $workphone = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/WORK_PHONE');
my $emailaddress = $result->valueof('//GetMemberInfoResult/diffgram/NewDataSet/MEMBERS/EMAIL');

print "<b>PIN Number:</b> $pin<br>";
print "<b>Password:</b> $password<br>";
print "<b>Title:</b> $title<br>";
print "<b>First Name:</b> $firstname<br>";
print "<b>Middle Name:</b> $middlename<br>";
print "<b>Last Name:</b> $lastname<br>";
print "<b>Suffix:</b> $suffix<br>";
print "<b>Address1:</b> $address1<br>";
print "<b>Address2:</b> $address2<br>";
print "<b>City:</b> $city<br>";
print "<b>State:</b> $stateprovince<br>";
print "<b>ZIP/Postal Code:</b> $postalcode<br>";
print "<b>Country:</b> $country<br>";
print "<b>Home Phone:</b> $homephone<br>";
print "<b>Work Phone:</b> $workphone<br>";
print "<b>Email Address:</b> $emailaddress";

}

else {
print join ', ',
$result->faultcode,
$result->faultstring,
$result->faultdetail;
}

}

Direct Responses: Write a response