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

as_base64Binary problem

Expand Messages
  • stefanastrupkruger
    Hi there SOAPers, I get the following error: odin:~/STORE - ./querystore 10 Can t use string ( as_base64Binary ) as a subroutine ref while strict refs in use
    Message 1 of 1 , Sep 6 3:59 AM
    • 0 Attachment
      Hi there SOAPers,

      I get the following error:

      odin:~/STORE ->./querystore 10
      Can't use string ("as_base64Binary") as a subroutine ref while "strict
      refs" in use at /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 1077.

      and on the server side:

      Cannot encode unnamed element as 'hash'. Will be encoded as 'map' instead

      Not doing anything out of the ordinary, my client looks like:

      #!/usr/local/bin/perl -w

      use Data::Dumper;
      use strict;

      use SOAP::Lite +autodispatch =>
      uri => 'http://myserver:8000/Store',
      proxy => 'http://myserver:8000',
      on_fault => sub { my($soap, $res) = @_;
      die ref $res ? $res->faultstring :
      $soap->transport->status, "\n";
      };

      my $store = Store->new;

      my $found = $store->Find(StartDate => '20050906',
      EndDate => '20050916',
      CustomerID => 5,
      Recipients => [ "domain.com" ]);

      if (defined $found and $found ne '') {
      print "Found matching emails:\n";
      print STDERR Dumper($found);
      } else {
      print STDERR "None found\n";
      }


      and the server is the standard

      #!/usr/local/bin/perl -w

      use SOAP::Transport::HTTP;

      $SIG{PIPE} = 'IGNORE';

      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 8000)
      -> dispatch_to('/mydir', 'Store')
      ;

      print "Contact to SOAP server at ", $daemon->url, "\n";
      $daemon->handle;

      Thanks for any pointers,

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