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

Re: Dump SOAP Message?

Expand Messages
  • rfbreedlov
    Thanks, but I don t have the control at this point in the server. ... the ... output. ... all ... the ... Thank ... ( /data/httpd/html/soap/modules , Demo ,
    Message 1 of 3 , Dec 10, 2004
    • 0 Attachment
      Thanks, but I don't have the control at this point in the server.
      --- In soaplite@yahoogroups.com, Bryce Harrington <bryce@o...> wrote:
      > I've used Data::Dumper for doing this on the client side.
      >
      > use Data::Dumper;
      > use SOAP::Lite;
      > #etc. etc.
      >
      > my $result = $soap->get_foo($bar);
      >
      > print Dumper($result);
      >
      >
      > On the server side, I think you could probably do similarly... For
      the
      > header maybe something like...
      >
      > package Foo;
      > use Data::Dumper;
      > #etc.
      >
      > sub get_foo {
      > my ($self, $bar, $header) = @_;
      >
      > warn Dumper($header);
      >
      > return 'baz';
      > }
      >
      > Note that dumping the result object generates a huge amount of
      output.
      > The header dump is smaller in comparison, so probably doesn't have
      all
      > the info you'd need, so I don't know if this is the full solution.
      > Anyway, hope it helps.
      >
      > Bryce
      >
      > On Thu, 9 Dec 2004, rfbreedlov wrote:
      > > In a server set up with SOAP::Lite, is there a simple way to dump
      the
      > > request message as text? (Please provide a relatively complete
      > > message, not just a reference to some function, if possible.)
      Thank
      > > you.
      > >
      > > My server is currently:
      > >
      > > #!/bin/perl -w
      > > use SOAP::Transport::HTTP;
      > > use Date::Manip;
      > >
      > > &Log("Server Started");
      > >
      > > $server = SOAP::Transport::HTTP::CGI
      > > -> dispatch_to
      > >
      ('/data/httpd/html/soap/modules', 'Demo', 'Temperatures', 'xmltest')
      > > -> on_action(\&onAction)
      > > -> handle;
      > >
      > > sub Log {
      > > my @lines = @_;
      > > open(OUT,">>serverlog.txt");
      > > print OUT &ParseDate('today') . ': ' . join
      > > ("\n",@lines) . "\n";
      > > close OUT;
      > > } # Log
      > >
      > >
      > > sub onAction {
      > > my ($a, $u, $n) = @_;
      > > &main::Log("action: $a, $u, $n");
      > > } # onAction
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
    Your message has been successfully submitted and would be delivered to recipients shortly.