package MyApp::Controller::Service; use strict; use warnings; use base qw(Catalyst::Controller::SOAP::RPC); __PACKAGE__->config->{wsdl} = 'foo.wsdl'; sub operation : SOAP(RPCLiteral) { my ($self, $c, $in) = @_; # where $in is a hashref with the result of the # XML::Compile::Schema # parse for the type of each of the message parts, # the key is the name of the part, the value is the # result of the parse. ... # to return a value, you can also use XML::Compile # features, according to the WSDL types. $c->stash->{soap}->compile_return({ ... }); } #### sub other_operation : Local SOAP('DocumentLiteral') { # the body is parsed the same way as RPC literal, # except that RPC Literal starts the parsing inside # the operation element, while Document Literal parses # the whole body. # The return can be set in the exact same way. } #### package MyApp::Controller::Service; use strict; use warnings; use base qw(Catalyst::Controller::SOAP::DocumentLiteralWrapped); __PACKAGE__->config->{wsdl} = 'foo.wsdl'; __PACKAGE__->config->{soap_action_prefix} = 'http://example.com/'; sub operation : SOAP('DocumentLiteral') { # The final operation is still DocumentLiteral, but # the superclass registers a dispatcher that will # forward to this action based on the SOAPAction # header. }