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

Problem with perl client for .NET Web Service using SOAP::Lite

Expand Messages
  • emsivajo
    Hi, I m new to Web Services and I m trying hard to create a client script for consuming a Web Service created on .NET platform. I ve been struggling in days
    Message 1 of 1 , Oct 29, 2006
    • 0 Attachment
      Hi,

      I'm new to Web Services and I'm trying hard to create a client script
      for consuming a Web Service created on .NET platform.

      I've been struggling in days but I just can't get any response printed.

      I get the error message "Can't call method "valueof" on an undefined
      value" in the error log.

      Any help would be much appreciated.

      The WSDL address if it could help you:
      https://www.creditsafe.se/webservices/cas2/service/getdata.asmx?WSDL

      My Perl Code:

      #!/usr/bin/perl

      use SOAP::Lite;

      &fetch_address();

      sub fetch_address()
      {
      print "Content-type: text/html \n\n";
      my $soap = SOAP::Lite
      -> uri('https://www.creditsafe.se/cas2/service/')
      #-> on_action( sub { join
      '"https://www.creditsafe.se/cas2/service/GetDataBySecure"', $_[1] } )
      -> proxy('http://www.creditsafe.se/cas2/service/getdata.asmx');

      my $method = SOAP::Data->name('GetDataBySecure')->attr({xmlns =>
      'https://www.creditsafe.se/cas2/service/'});

      my @params=
      (
      SOAP::Data->name('UserName')->value('username'),
      SOAP::Data->name('Password')->value('password'),
      SOAP::Data->name('TransactionId')->value('transid'),
      SOAP::Data->name('Language')->value('language'),
      SOAP::Data->name('Block_Name')->value('blockid'),
      SOAP::Data->name('SearchNumber')->value('searchnbr'));

      my $results = $soap->call($method => @params)->result;

      my $retStr =
      $results->valueof('//GetDataBySecureResponse/GetDataBySecureResult/SearchNumber');
      print $retStr;


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