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

View XML

Expand Messages
  • Karjala
    Hi Is there any way I can view the raw XML of a client request before it sent? (I m on the client side and need it for debugging) Is there also a way to view
    Message 1 of 3 , Apr 12, 2006
    • 0 Attachment
      Hi

      Is there any way I can view the raw XML of a client request before it
      sent? (I'm on the client side and need it for debugging)
      Is there also a way to view the raw XML of the reponse?

      I've looked through the cookbook and the documentation and found nothing
      of the sort...

      ->readable(1) suggests that it's possible, but I still can't find the way.
      Also I'm afraid that if I use serialize on the hashref created from the
      response to get the XML, I will loose all the attributes which were in
      the original XML of the response.

      And in any case, is there a way to view the XML of the request?

      Thanks,
      - Karjala
    • Karjala
      I just found this: $client- transport- http_request- as_string $client- transport- http_response- as_string in
      Message 2 of 3 , Apr 12, 2006
      • 0 Attachment
        I just found this:

        $client->transport->http_request->as_string
        $client->transport->http_response->as_string

        in

        http://www.majordojo.com/soaplite/2005/03/unlocking_065_d.html



        David Webster wrote:
        > I echo this request. It seems imperative for logging purposes however I
        > don't see how it is easily done.
        > Regards,
        > David Webster
        >
        > -----Original Message-----
        > From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com] On Behalf
        > Of Karjala
        > Sent: Thursday, 13 April 2006 11:11 AM
        > To: soaplite@yahoogroups.com
        > Subject: [soaplite] View XML
        >
        > Hi
        >
        > Is there any way I can view the raw XML of a client request before it
        > sent? (I'm on the client side and need it for debugging)
        > Is there also a way to view the raw XML of the reponse?
        >
        > I've looked through the cookbook and the documentation and found nothing
        > of the sort...
        >
        > ->readable(1) suggests that it's possible, but I still can't find the way.
        > Also I'm afraid that if I use serialize on the hashref created from the
        > response to get the XML, I will loose all the attributes which were in
        > the original XML of the response.
        >
        > And in any case, is there a way to view the XML of the request?
        >
        > Thanks,
        > - Karjala
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
        >
      • Eric Bridger
        Yes. Well you cannot do this before it is sent but ... print $client- transport- http_request- content() . n ; print
        Message 3 of 3 , Apr 12, 2006
        • 0 Attachment
          Yes.

          Well you cannot do this before it is sent but ...

          print $client->transport->http_request->content() . "\n";
          print $client->transport->http_response->content() . "\n";

          will show you both the xml sent and received after being sent.

          You can also use:

          use SOAP::Lite +trace => 'debug';

          to see the whole interaction.


          Eric


          Karjala said:
          > Hi
          >
          > Is there any way I can view the raw XML of a client request before it
          > sent? (I'm on the client side and need it for debugging)
          > Is there also a way to view the raw XML of the reponse?
          >
          > I've looked through the cookbook and the documentation and found nothing
          > of the sort...
          >
          > ->readable(1) suggests that it's possible, but I still can't find the way.
          > Also I'm afraid that if I use serialize on the hashref created from the
          > response to get the XML, I will loose all the attributes which were in
          > the original XML of the response.
          >
          > And in any case, is there a way to view the XML of the request?
          >
          > Thanks,
          > - Karjala
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.