I'm trying to develop a SOAP web service that's a little bit more useful than most of the samples seem to be (if I see one more 'hello world' example, I'll scream).

I'd also like to be able to consume this 'ere webservice from a .Net environment, as it will be a public API.

I'd like to be able to return a simple xml document. But at present, the only way I can see how to do this is to return a stringified version of the XML document, which seems absurd.

I've failed in my quest to find examples returning XML to be consumed, yet I can find plenty of consumers (grr!)

Does anyone have, or know of, some good examples that would fall into this category?

Edit: added below: I've got:

$retval = SOAP::Data->name('events'); foreach my $thisevt (keys %evtdbase) { $retval->value( SOAP::Data->name('event')->value( SOAP::Data->type +(string => $evtdbase{$thisevt} ) ) ); }
Now; this returns a single XML element. Hopefully it's obvious from the foreach that I'm trying to create something of the form:
<events> <event xsi:type="xsd:string">foo</event> <event xsi:type="xsd:string">bar</event> : : </events>
But instead, I'm getting just:
<event xsi:type="xsd:string">foo</event>


In reply to Returning complex results from SOAP::Lite by RatArsed

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.