I've done this before to make an XML-RPC server.  The only way I could think to do it was to grab the POST data from the request using a mod_perl handler before HTML::Mason was involved.  I don't recall if I parsed the XML at that point and stuck it back in the request or if I just saved it in $r->pnotes or something and parsed it once it got to the Mason portion of the request.

On 5/9/06, Karjala <[EMAIL PROTECTED]> wrote:
I need to create a SOAP (XML, like XML-RPC) server and was wondering if
it's possible to do that with Mason.

The only issue that seems to be a problem is the following: SOAP
requests are HTTP POST requests whose "body" is XML instead of
some_param=some_value.

Reading Mason's documentation makes me think there might be no way to
access this XML-style content of the HTTP POST request.
See the "common traps" section :
http://www.masonhq.com/docs/manual/Devel.html#common_traps
"Mason calls $r->content itself to read request input, emptying the
input buffer and leaving a trap for the unwary: subsequent calls to
$r->content hang the server. This is a mod_perl ``feature'' that may be
fixed in an upcoming release."

Well, if Mason tries to parse the content as param=value nomatter what
and then empties this content, it seems the XML will disappear. But if
somehow there's a way to prevent Mason from doing that, or if the XML is
stored somewhere else, maybe there is a solution.

Any hints?

Thanks,

- Karjala






-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to