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

as_Foobar deserializer in a CGI server

Expand Messages
  • Ian Kallen
    Using a SOAP::Lite 0.51 CGI server, I tried using the as_Foobar syntax ie #!/usr/bin/perl use SOAP::Transport::HTTP; BEGIN { sub SOAP::Deserializer::as_Foobar
    Message 1 of 2 , Nov 10, 2001
    • 0 Attachment
      Using a SOAP::Lite 0.51 CGI server, I tried using the as_Foobar syntax ie

      #!/usr/bin/perl
      use SOAP::Transport::HTTP;

      BEGIN {
      sub SOAP::Deserializer::as_Foobar {
      # output expected in the error log
      print STDERR "\nDEBUG -- @_\n";
      my $self = shift;
      @_;
      } # as_Foobar
      }

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('/path/to/my/lib',
      'MyClass')
      -> handle;

      __END__

      I'm expecting to see the DEBUG stuff in the error log to confirm that this
      method is getting called. However, it doesn't appear to be getting called
      at all. Just for reference sake, the "Foobar" is a java Vector from an
      Apache SOAP client (that has a Vector in the Call object's request
      parameters) -- all I'm getting is map with an "item" key and a value that
      is the _last_ value in java Vector.

      --
      Ian Kallen <spidaman@...> | AIM: iankallen
    • Ian Kallen
      Ah, reviewing the archives and poking around the use of $schemaclass in SOAP::Deserializer led me to do this BEGIN { sub
      Message 2 of 2 , Nov 10, 2001
      • 0 Attachment
        Ah, reviewing the archives and poking around the use of $schemaclass in
        SOAP::Deserializer led me to do this


        BEGIN {
        sub SOAP::XMLSchemaApacheSOAP::Deserializer::as_Vector {
        my $self = shift;
        [ map { scalar(($self->decode_object($_))[1]) } @{$_[3] || []} ];
        } # as_Vector
        }

        While I haven't finished shaking this out, it appears to be the bit of
        magic I need; Data::Dumper is showing a fully populated arrayref :)

        cheers,
        -Ian

        --
        Ian Kallen <spidaman@...> | AIM: iankallen

        On Sat, 10 Nov 2001, Ian Kallen wrote:

        >
        > Using a SOAP::Lite 0.51 CGI server, I tried using the as_Foobar syntax ie
        >
        > #!/usr/bin/perl
        > use SOAP::Transport::HTTP;
        >
        > BEGIN {
        > sub SOAP::Deserializer::as_Foobar {
        > # output expected in the error log
        > print STDERR "\nDEBUG -- @_\n";
        > my $self = shift;
        > @_;
        > } # as_Foobar
        > }
        >
        > SOAP::Transport::HTTP::CGI
        > -> dispatch_to('/path/to/my/lib',
        > 'MyClass')
        > -> handle;
        >
        > __END__
        >
        > I'm expecting to see the DEBUG stuff in the error log to confirm that this
        > method is getting called. However, it doesn't appear to be getting called
        > at all. Just for reference sake, the "Foobar" is a java Vector from an
        > Apache SOAP client (that has a Vector in the Call object's request
        > parameters) -- all I'm getting is map with an "item" key and a value that
        > is the _last_ value in java Vector.
        >
        > --
        > Ian Kallen <spidaman@...> | AIM: iankallen
        >
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.