I'm trying to basically make a proxy for a SOAP service. So from a mod_perl2 + HTML::Mason handler, I want to call a SOAP service and return something to the browser. I haven't decided yet if what's returned will be JSON or XML, but I have the following problem before that anyway.

The only way I see to get the "raw XML" returned from the SOAP service is to set $soap->outputxml, then the SOAP call will return XML instead of a SOM object. That would be fine for the proxy, but.... I'd also like to be able to intervene in case there is a SOAP <Fault> returned. In that case, I'll have to tediously parse the raw XML (instead of using the convenient $som->fault method to check if there was a fault). Finally, the question: is there any way, besides copying and pasting the deserializer code from SOAP::Lite's call method, to cleanly have my cake and eat it too? That is, is there any way to retrieve the raw XML but also have the SOAP call return the normal SOM object?


In reply to SOAP::Lite web proxy by ForgotPasswordAgain

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.