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

Re: Question using .NET wsdl file in perl client

Expand Messages
  • obc_spike
    ... Thanks for the help. My goal was the shorter WSDL notation, but still being able to iterate individual items from the returned DataSet (i.e.,
    Message 1 of 6 , May 5 8:19 AM
    • 0 Attachment
      > You need to access everything through the som object. In your case it
      > looks like the return value from Listbooks() does not give you
      > everything that you want.

      Thanks for the help. My goal was the shorter WSDL notation, but still
      being able to iterate individual items from the returned DataSet
      (i.e., $_->BookTitle). The key was adding a deserializer. This code
      works for me:

      #!/usr/bin/perl -w
      use SOAP::Lite;
      my $obj = SOAP::Lite
      ->
      service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl')
      -> deserializer(SOAP::Custom::XML::Deserializer->new);
      my $books = $obj->ListBooks();
      my $som = $obj->call;
      unless ($som->fault) {
      for ($som->valueof('//bible_content')) {
      print $_->BookTitle, "\n";
      }
      }

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