1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
|
=encoding utf8
=head1 NAME
XML::Compile::SOAP11::Operation - defines a SOAP11 interaction
=head1 INHERITANCE
XML::Compile::SOAP11::Operation
is a XML::Compile::SOAP::Operation
=head1 SYNOPSIS
# object created by XML::Compile::WSDL*
my $op = $wsdl->operation('GetStockPrices');
$op->explain($wsdl, PERL => 'INPUT', recurse => 1);
=head1 DESCRIPTION
Objects of this type define one possible SOAP11 interaction, either
client side or server side.
Extends L<"DESCRIPTION" in XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation/"DESCRIPTION">.
=head1 METHODS
Extends L<"METHODS" in XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation/"METHODS">.
=head2 Constructors
Extends L<"Constructors" in XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation/"Constructors">.
=over 4
=item XML::Compile::SOAP11::Operation-E<gt>B<new>(%options)
C<input_def>, C<output_def> and C<fault_def> are HASHes which contain
the input and output message header, body and fault-header definitions
in WSDL1.1 style.
-Option --Defined in --Default
action XML::Compile::SOAP::Operation undef
endpoints XML::Compile::SOAP::Operation []
fault_def <undef>
input_def <undef>
kind XML::Compile::SOAP::Operation <required>
name XML::Compile::SOAP::Operation <required>
output_def <undef>
schemas XML::Compile::SOAP::Operation <required>
server_type XML::Compile::SOAP::Operation undef
style 'document'
transport XML::Compile::SOAP::Operation 'HTTP'
=over 2
=item action => STRING
=item endpoints => ADDRESS|ARRAY
=item fault_def => HASH
=item input_def => HASH
=item kind => 'one-way'|...
=item name => STRING
=item output_def => HASH
=item schemas => XML::Compile::Cache
=item server_type => NAME
=item style => 'document'|'rpc'
=item transport => URI|'HTTP'
=back
=back
=head2 Accessors
Extends L<"Accessors" in XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation/"Accessors">.
=over 4
=item $obj-E<gt>B<bindingName>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<clientClass>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<endPoints>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<kind>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<longName>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<name>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<portName>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<schemas>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<serverClass>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<serviceName>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<soapAction>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<style>()
=item $obj-E<gt>B<version>()
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=item $obj-E<gt>B<wsaAction>('INPUT'|'OUTPUT')
Inherited, see L<XML::Compile::SOAP::Operation/"Accessors">
=back
=head2 Modify
Operations are often modified by SOAP extensions.
See L<XML::Compile::SOAP::WSA|XML::Compile::SOAP::WSA>, for instance. Also demonstrated in
the FAQ, L<XML::Compile::SOAP::FAQ|XML::Compile::SOAP::FAQ>.
=over 4
=item $obj-E<gt>B<addHeader>( <'INPUT'|'OUTPUT'|'FAULT'>, $label, $element, %options )
Add a header definitions. Many protocols on top of SOAP, like WSS, add
headers to the operations which are not specified in the WSDL.
[2.31] When you add a header with same $label again, it will get silently
ignored unless the $element type differs. An $element is either a full
type or a [3.00] prefixed type.
-Option --Default
destination undef
mustUnderstand undef
=over 2
=item destination => ROLE
[2.33] adds the destination attribute.
=item mustUnderstand => BOOLEAN
[2.33] adds the mustUnderstand attribute.
=back
=back
=head2 Handlers
Extends L<"Handlers" in XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation/"Handlers">.
=over 4
=item $obj-E<gt>B<compileClient>(%options)
Returns one CODE reference which handles the processing for this
operation. Options C<transporter>, C<transport_hook>, and
C<endpoint> are passed to L<compileTransporter()|XML::Compile::SOAP::Operation/"Handlers">.
You pass that CODE reference an input message of the correct
type, as pure Perl HASH structure. An 'request-response' operation
will return then answer, or C<undef> in case of failure. An 'one-way'
operation with return C<undef> in case of failure, and a true value
when successful.
You B<cannot> pass options for L<XML::Compile::Schema::compile()|XML::Compile::Schema/"Compilers">, like
C<<sloppy_integers => 0>>, hooks or typemaps this way. Provide these to
the C<::WSDL> or other C<::Cache> object which defines the types, via
C<new> option C<opts_rw> and friends.
=item $obj-E<gt>B<compileHandler>(%options)
Prepare the routines which will decode the request and encode the answer,
as will be run on the server. The L<XML::Compile::SOAP::Server|XML::Compile::SOAP::Server> will
connect these. All %options will get passed to
L<XML::Compile::SOAP11::Server::compileHandler()|XML::Compile::SOAP::Server/"Actions">
-Option --Default
callback <required>
selector <from input def>
=over 2
=item callback => CODE
=item selector => CODE
Determines whether the handler belongs to a received message.
=back
=item $obj-E<gt>B<compileTransporter>(%options)
Inherited, see L<XML::Compile::SOAP::Operation/"Handlers">
=back
=head2 Helpers
Extends L<"Helpers" in XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation/"Helpers">.
=over 4
=item $obj-E<gt>B<explain>($wsdl, $format, $direction, %options)
[since 2.13]
Dump an annotated structure showing how the operation works, helping
developers to understand the schema. The $format must be string "PERL".
($format "XML" is not yet supported)
When the $direction is string "INPUT", it will return the message which
the client sends to the server (input for the server). The "OUTPUT"
message is sent as response by the server.
All %options besides those described here are passed to
L<XML::Compile::Schema::template()|XML::Compile::Schema/"Compilers">, when C<recurse> is enabled.
-Option --Default
recurse <false>
skip_header <false>
=over 2
=item recurse => BOOLEAN
Append the templates of all the part structures.
=item skip_header => BOOLEAN
=back
=item $obj-E<gt>B<parsedWSDL>(%options)
Inherited, see L<XML::Compile::SOAP::Operation/"Helpers">
=back
=head1 SEE ALSO
This module is part of XML-Compile-SOAP distribution version 3.26,
built on November 20, 2019. Website: F<http://perl.overmeer.net/CPAN/>
=head1 LICENSE
Copyrights 2007-2019 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://dev.perl.org/licenses/>
|