Loading ...
Sorry, an error occurred while loading the content.

Help with SOAP Lite client error problems - CGI code

Expand Messages
  • keepontruckn2
    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
    Message 1 of 1 , Mar 12, 2006
    • 0 Attachment
      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.

      I get basic errors throughout, starting with:
      Error - SOAP::Transport::HTTP::Client::send_receive: POST
      It seems as if the user access information is not carried through as
      it should, but I truly have no idea what the problem is.

      Here is what I have put together so far.

      Thanks,
      Mark

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

      }

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


      }
    Your message has been successfully submitted and would be delivered to recipients shortly.