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

View Actual SOAP Messages

Expand Messages
  • perlmunger
    It seems like this should be obvious (and it s probably just me), but I m not sure how to see the actual SOAP message being sent from the server in their raw
    Message 1 of 3 , Apr 9, 2004
    • 0 Attachment
      It seems like this should be obvious (and it's probably just me), but
      I'm not sure how to see the actual SOAP message being sent from the
      server in their raw XML format. This is from my own server, so if
      there's something I have to do on the server end instead of the
      client, I can change that too.

      Here's My Client Code:

      ----------------------------
      #!C:/perl/bin/perl -w
      use SOAP::Lite;
      $HOST = "http://localhost/soaptest/acdispatcher.cgi";
      $NS = "urn:ACDispatcher";

      my $soap = SOAP::Lite
      ->readable(1)
      ->uri($NS)
      ->proxy($HOST);

      $som = $soap->getProjectData(
      SOAP::Data->name("userid" => "mlong"));
      print "The response from the server was:\n".$som->result."\n";
      ----------------------------

      This code works, I'm just not sure how to view the XML message. Any
      suggestions?

      Thanks.

      -Matt
    • amigo_boy2000
      ... Do you mean you just want to see it from your terminal window when you execute the client? I found the following somewhere. The trace part of it shows
      Message 2 of 3 , Apr 9, 2004
      • 0 Attachment
        --- In soaplite@yahoogroups.com, "perlmunger" <matt.long@m...> wrote:
        > I'm not sure how to see the actual SOAP message being sent from the
        > server in their raw XML format.

        Do you mean you just want to see it from your terminal window when
        you execute the client? I found the following somewhere. The "trace"
        part of it shows everything you're sending and the server is sending
        back to you. If you mean you want to access it from inside the
        script, I don't know how to do that.

        =======================

        use SOAP::Lite +trace=>[qw(headers fault debug)],
        on_fault => sub {
        my $soap = shift;
        my $res = shift;
        ref $res ? warn(join " ", "SOAP FAULT:", $res->faultstring, "\n")
        : warn(join " ", "TRANSPORT ERROR:", $soap->transport-
        >status, "\n");
        return new SOAP::SOM;
        };
      • Matt Long
        The trace was what I needed. Thank you! -Matt ... From: amigo_boy2000 [mailto:amigo_boy2000@yahoo.com] Sent: Friday, April 09, 2004 3:10 PM To:
        Message 3 of 3 , Apr 9, 2004
        • 0 Attachment

          The trace was what I needed. Thank you!

           

          -Matt

           

          -----Original Message-----
          From: amigo_boy2000 [mailto:amigo_boy2000@...]
          Sent:
          Friday, April 09, 2004 3:10 PM
          To:
          soaplite@yahoogroups.com
          Subject: [soaplite] Re: View Actual SOAP Messages

           

          --- In soaplite@yahoogroups.com, "perlmunger" <matt.long@m...> wrote:
          > I'm not sure how to see the actual SOAP message being sent from the
          > server in their raw XML format.

          Do you mean you just want to see it from your terminal window when
          you execute the client? I found the following somewhere. The "trace"
          part of it shows everything you're sending and the server is sending
          back to you. If you mean you want to access it from inside the
          script, I don't know how to do that.

          =======================

          use SOAP::Lite +trace=>[qw(headers fault debug)],
            on_fault => sub {
              my $soap = shift;
              my $res = shift;
              ref $res ? warn(join " ", "SOAP FAULT:", $res->faultstring, "\n")
                       : warn(join " ", "TRANSPORT ERROR:", $soap->transport-
          >status, "\n");
              return new SOAP::SOM;
            };



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