View on
Mark Overmeer > XML-Compile-SOAP-2.38 > XML::Compile::SOAP11::Operation



Annotate this POD


Open  2
View/Report Bugs
Module Version: 2.38   Source   Latest Release: XML-Compile-SOAP-3.24


XML::Compile::SOAP11::Operation - defines a SOAP11 interaction


   is a XML::Compile::SOAP::Operation


 # object created by XML::Compile::WSDL*
 my $op = $wsdl->operation('GetStockPrices');
 $op->explain($wsdl, PERL => 'INPUT', recurse => 1);


Objects of this type define one possible SOAP11 interaction, either client side or server side.

See documentation in the base class.


See documentation in the base class.


See documentation in the base class.


input_def, output_def and 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>
  kin         XML::Compile::SOAP::Operation  <required>
  nam         XML::Compile::SOAP::Operation  <required>
  output_def                                 <undef>
  schemas     XML::Compile::SOAP::Operation  <required>
  style                                      'document'
  transport   XML::Compile::SOAP::Operation  'HTTP'
action => STRING
endpoints => ADDRESS|ARRAY
fault_def => HASH
input_def => HASH
kin => d
nam => e
output_def => HASH
schemas => XML::Compile::Cache
style => 'document'|'rpc'
transport => URI|'HTTP'


See documentation in the base class.


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


See "Accessors" in XML::Compile::SOAP::Operation


Operations are often modified by SOAP extensions. See XML::Compile::SOAP::WSA, for instance. Also demonstrated in the FAQ, XML::Compile::SOAP::FAQ.


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.

 -Option        --Default
  destination     undef
  mustUnderstand  undef
destination => ROLE

[2.33] adds the destination attribute,

mustUnderstand => BOOLEAN

[2.33] adds the mustUnderstand attribute.


See documentation in the base class.


Returns one CODE reference which handles the processing for this operation. Options transporter, transport_hook, and endpoint are passed to compileTransporter().

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 undef in case of failure. An 'one-way' operation with return undef in case of failure, and a true value when successfull.

You cannot pass options for XML::Compile::Schema::compile(), like <sloppy_integers = 0>>, hooks or typemaps this way. Provide these to the ::WSDL or other ::Cache object which defines the types, via new option opts_rw and friends.


Prepare the routines which will decode the request and encode the answer, as will be run on the server. The XML::Compile::SOAP::Server will connect these. All OPTIONS will get passed to XML::Compile::SOAP11::Server::compileHandler()

 -Option  --Default
  callback  <required>
  selector  <from input def>
callback => CODE
selector => CODE

Determines whether the handler belongs to a received message.


See "Handlers" in XML::Compile::SOAP::Operation


See documentation in the base class.


[since 2.13]

Dump an annotated structure showing how the operation works, helping developers to understand the schema. FORMAT is PERL. (XML is not yet supported)

The DIRECTION is 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 XML::Compile::Schema::template(), when recurse is enabled.

 -Option     --Default
  recurse      <false>
  skip_header  <false>
recurse => BOOLEAN

Append the templates of all the part structures.

skip_header => BOOLEAN

[2.29] For some purposes, it is useful to get access to the parsed WSDL structure.

Be aware that the structure returned is consided "internal" and strongly influenced by behavior of XML::Compile; backwards compatibility will not be maintained at all cost.

You can use XML::Compile::Schema::template() format TREE to get more details about the element types mentioned in this structure.


  use Data::Dumper;
  $Data::Dumper::Indent    = 1;
  $Data::Dumper::Quotekeys = 0;

  print Dumper $op->parsedWSDL;
XML::Compile::SOAP11::Operation->register(URI, ENVNS)

See "Helpers" in XML::Compile::SOAP::Operation


This module is part of XML-Compile-SOAP distribution version 2.38, built on August 22, 2013. Website:

Other distributions in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::SOAP::WSA, XML::Compile::C14N, XML::Compile::WSS, XML::Compile::WSS::Signature, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, XML::Rewrite and XML::LibXML::Simple.

Please post questions or ideas to the mailinglist at . For live contact with other developers, visit the #xml-compile channel on


Copyrights 2007-2013 by [Mark Overmeer]. 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

syntax highlighting: