I'm running Perl v5.8.0 built for i386-linux-thread-multi under Linux 2.4.21-57.ELsmp. Our SOAP::Lite is at v0.710.08. We're dealing with a picky SOAP client and have set up the following CGI dispatch file (use statements ommitted for brevity):

SOAP::Transport::HTTP::CGI ->dispatch_with({'http://echo.nasa.gov/v9/order/fulfillment' => 'OrderFulfillmentService'}) ->handle;

exit 0;

package OrderFulfillmentService;

sub Submit {return (SOAP::Data->name('SubmitResponse')->type('xml') ->value(ECHODataOrder::DataOrderRequest(@_)));}

Because of the way the SOAP client calls our Submit service, we have to use the dispatch_with() syntax. We successfully receive and process their communication and respond with something like this:

<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SubmitResponse xmlns="http://echo.nasa.gov/v9/order/fulfillment">
...
</SubmitResponse>
</soap:Body>
</soap:Envelope>

For some reason, SOAP::Lite automatically inserts the xmlns="http://echo.nasa.gov/v9/order/fulfillment" in the SubmitResponse tag. In any case, the SOAP client rejects our response. The authors of the SOAP client believe that we need to modify our SubmitResponse such that a prefix is added like this:

<order:SubmitResponse xmlns:order="http://echo.nasa.gov/v9/order/fulfillment">
...
</order:SubmitResponse>

I have tried adding various elements to our "{return (SOAP::Data->" statement like "->prefix('order')" and "->attr({prefix => 'order'}), but everything seems to be ignored. How can I specify the prefix of my SubmitResponse message/tag? Many thanks!

In reply to Setting the Prefix for a SOAP Response via SOAP::Data by Anonymous Monk

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.