• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Catalyst/H10-Mar-2013-1,395522

t/H10-Mar-2013-1,220950

ChangesH A D10-Mar-201315.1 KiB139138

MANIFESTH A D10-Mar-20131.4 KiB4746

META.jsonH A D10-Mar-20131 KiB4645

META.ymlH A D10-Mar-2013585 2726

Makefile.PLH A D10-Mar-2013723 1512

READMEH A D10-Mar-20134.3 KiB11689

README

1NAME
2    Catalyst::Controller::SOAP - Catalyst SOAP Controller
3
4SYNOPSIS
5        package MyApp::Controller::Example;
6        use base 'Catalyst::Controller::SOAP';
7
8        # available in "/example" as operation "echo"
9        # parsing the arguments as soap-encoded.
10        sub echo : SOAP('RPCEncoded') {
11            my ( $self, $c, @args ) = @_;
12        }
13
14        # available in "/example" as operation "ping". The arguments are
15        # treated as a literal document and passed to the method as a
16        # XML::LibXML object
17        sub ping : SOAP('RPCLiteral') {
18            my ( $self, $c, $xml) = @_;
19            my $name = $xml->findValue('some xpath expression');
20        }
21
22        # avaiable as "/example/world" in document context. The entire body
23        # is delivered to the method as a XML::LibXML object.
24        sub world : SOAP('DocumentLiteral') {
25            my ($self, $c, $doc) = @_;
26        }
27
28        # this is the endpoint from where the RPC operations will be
29        # dispatched. This code won't be executed at all.
30        sub index : SOAP('RPCEndpoint') {}
31
32ABSTACT
33    Implements SOAP serving support in Catalyst.
34
35DESCRIPTION
36    SOAP Controller for Catalyst which we tried to make compatible with the
37    way Catalyst works with URLS.It is important to notice that this
38    controller declares by default an index operation which will dispatch
39    the RPC operations under this class.
40
41ATTRIBUTES
42    This class implements the SOAP attribute wich is used to do the mapping
43    of that operation to the apropriate action class. The name of the class
44    used is formed as Catalyst::Action::SOAP::$value, unless the parameter
45    of the attribute starts with a '+', which implies complete namespace.
46
47    The implementation of SOAP Action classes helps delivering specific SOAP
48    scenarios, like HTTP GET, RPC Encoded, RPC Literal or Document Literal,
49    or even Document RDF or just about any required combination.
50
51    See Catalyst::Action::SOAP::DocumentLiteral for an example.
52
53ACCESSORS
54    Once you tagged one of the methods, you'll have an $c->stash->{soap}
55    accessor which will return an "Catalyst::Controller::SOAP::Helper"
56    object. It's important to notice that this is achieved by the fact that
57    all the SOAP Action classes are subclasses of Catalyst::Action::SOAP,
58    which implements most of that.
59
60    You can query this object as follows:
61
62    $c->stash->{soap}->envelope()
63        The original SOAP envelope as string.
64
65    $c->stash->{soap}->parsed_envelope()
66        The parsed envelope as an XML::LibXML object.
67
68    $c->stash->{soap}->arguments()
69        The arguments of a RPC call.
70
71    $c->stash->{soap}->fault({code => $code,reason => $reason, detail =>
72    $detail])
73        Allows you to set fault code and message. Optionally, you may define
74        the code itself as an arrayref where the first item will be this
75        code and the second will be the subcode, which recursively may be
76        another arrayref.
77
78    $c->stash->{soap}->encoded_return(\@data)
79        This method will prepare the return value to be a soap encoded data.
80
81    $c->stash->{soap}->literal_return($xml_node)
82        This method will prepare the return value to be a literal XML
83        document, in this case, you can pass just the node that will be the
84        root in the return message.
85
86    $c->stash->{soap}->literal_string_return($xml_text)
87        In this case, the argument is used literally inside the message. It
88        is supposed to already contain all namespace definitions in it.
89
90    $c->stash->{soap}->string_return($non_xml_text)
91        In this case, the given text is encoded as CDATA inside the SOAP
92        message.
93
94TODO
95    At this moment, this is a very early release. So almost everything is
96    still to be done. The only thing done right now is getting the body from
97    the message and dispatching the correct method.
98
99SEE ALSO
100    Catalyst::Action::SOAP, XML::LibXML,
101    Catalyst::Action::SOAP::DocumentLiteral,
102    Catalyst::Action::SOAP::RPCEncoded, Catalyst::Action::SOAP::HTTPGet
103
104AUTHORS
105    Daniel Ruoso "daniel@ruoso.com"
106    Drew Taylor "drew@drewtaylor.com"
107
108BUG REPORTS
109    Please submit all bugs regarding "Catalyst::Controller::SOAP" to
110    "bug-catalyst-controller-soap@rt.cpan.org"
111
112LICENSE
113    This library is free software, you can redistribute it and/or modify it
114    under the same terms as Perl itself.
115
116