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

Re: [soaplite] grab XML as string before posting

Expand Messages
  • Duncan Cameron
    Martin You didn t say what you wanted to do with the serialised XML but either of these approaches might give you what you want serialise a data item: my
    Message 1 of 3 , Oct 28, 2004
    View Source
    • 0 Attachment
      Martin
      You didn't say what you wanted to do with the serialised XML but either of these approaches might give you what you want

      serialise a data item:

      my $soap= SOAP::Lite-> ... etc

      $soap->serializer->serialize($p)

      or serialise the complete SOAP envelope:

      $soap->serializer->envelope('method', 'somemethod', $p1, $p2 ...)

      If you browse through the source for SOAP::Lite you should be able to see what these two examples are doing.

      Duncan

      At 2004-10-28, 19:01:25 Jon Orwant <orwant@...> wrote:

      >
      >
      >I'll leave explaining the proper technique to someone else, but...this
      >is a horrible kludge and you should question the goodness of a world in
      >which you have to do it, but as a last resort you can always intercept
      >STDERR to capture tracing info:
      >
      > use SOAP::Lite +trace => "debug";
      > close STDERR;
      > open STDERR, '>', \$stderr;
      >
      >And then use simple regexes to extract the incoming and outgoing XML
      >from $stderr.
      >
      >-Jon
      >
      >On Oct 27, 2004, at 10:15 PM, Martin Naskovski wrote:
      >
      >>
      >> Hi - I am new to perl as well as new to the SOAP::Lite package - I
      >> have a
      >> fairly simple question - is it possible to somehow 'grab' the
      >> serialized
      >> XML after I have built it using SOAP::Data? I know about the +debug
      >> option, but that does two things I don't want - it outputs my XML only
      >> when I make the SOAP call, and two, I cannot capture it as a string in
      >> some perl variable.
      >>
      >> Can the XML be somehow retained as a string once it's been built with
      >> SOAP::Data? Thank you.
      >>
      >> Martin
    Your message has been successfully submitted and would be delivered to recipients shortly.