-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Karjala wrote:
> 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.
Override HTML::Mason::ApacheHandler's "request_args" method.
For instance:
package myAH;
use strict;
use warnings;
use base 'HTML::Mason::ApacheHandler';
use Sub::Installer;
use myFunkyXMLparser;
__PACKAGE__->reinstall_sub({
request_args => sub {
my $self = shift;
my ($args, $r, $cgi_object) = $self->SUPER::request_args(@_);
# trigger it only when dealing with xml posts? ;-)
if ($r->content_type eq 'text/xml' && $r->method eq 'POST') {
# parse XML request
my $xml_args = myFunkyXMLparser->xml2args($r);
# push in (by overrinding!) XML args to current mason object
while (my ($key, $val) = each %{$xml_args} ) {
# plug more code here to limit args overriding
# (policy changes)
$args->{$key} = $val;
}
}
return ($args, $r, $cgi_object);
}
});
1; # end of myAH
^ use something like this as your mason object and you'll get your args
in the "usual" mason way
(as in: my $ah = myAH->new(..., comp_root => ..., ...) ).
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----
iD8DBQFEYZlutZHp/AYZiNkRAjvaAJ4xf6iYihLJgaTqVrBbhDhhHdpXPQCfbR6l
wnK3xT5487Qeb41+oNw4iBQ=
=muhw
-----END PGP SIGNATURE-----
-------------------------------------------------------
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