NAME

XML::Compile::WSDL11::Operation - defines a possible SOAP interaction

INHERITANCE

SYNOPSIS

# created by XML::Compile::WSDL11

DESCRIPTION

These objects are created by XML::Compile::WSDL11, grouping information about a certain specific message interchange between a client and a server. You can better (try to) create a WSDL file itself, then attempt to instantiate these objects yourself... or even better: use XML::Compile::SOAP11 directly, and forget WSDL complexity.

There are three styles of SOAP: Document-style, RPC-literal and RPC-encoded. The first can be used directly, for the SOAP-RPC will require you to specify more information about the expected message types.

METHODS

Constructors

$obj->new(OPTIONS)

    The OPTIONS are all collected from the WSDL description by XML::Compile::WSDL11::operation(). End-users should not attempt to initiate this object directly.

    Option  --Default
    action    <from wsdl>
    bind_op   undef
    binding   <required>
    name      <required>
    port      <required>
    portType  <required>
    port_op   <required>
    protocol  'HTTP'
    service   <required>
    style     <from wsdl operation style> | 'document'
    wsdl      <required>

    . action => URI

    . bind_op => HASH

    . binding => HASH

    . name => STRING

    . port => HASH

    . portType => HASH

    . port_op => HASH

    . protocol => URI|'HTTP'

      HTTP is short for http://schemas.xmlsoap.org/soap/http/, which is a constant to indicate that transport should use the HyperText Transfer Protocol.

    . service => HASH

    . style => 'document'|'rpc'

    . wsdl => XML::Compile::WSDL11 object

Accessors

$obj->bindOperation

$obj->bindings

$obj->name

$obj->port

$obj->portOperation

$obj->portType

$obj->schemas

$obj->service

$obj->wsdl

Use

$obj->endPointAddresses

    Returns the list of alternative URLs for the end-point, which should be defined within the service's port declaration.

$obj->kind

    This returns the type of operation this is. There are four kinds, which are returned as strings one-way, request-response, sollicit-response, and notification. The latter two are initiated by a server, the former two by a client.

$obj->soapAction

$obj->soapNameSpace

$obj->soapVersion

Handlers

$obj->compileClient(OPTIONS)

    Returns one CODE reference which handles the processing for this operation.

    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.

    Besides the OPTIONS listed, you can also specify anything which is accepted by XML::Compile::Schema::compile(), like sloppy_integers => 1 or hooks.

    Option          --Default
    endpoint_address  <from WSDL>
    protocol          new(protocol)|<from soapAction>
    rpcin             undef
    rpcout            undef
    style             new(style)|'document'
    transport         <created>
    transport_hook    undef
    use               'literal'

    . endpoint_address => URI

      Overrule the destination address.

    . protocol => URI|'HTTP'

      Only the HTTP protocol is supported on the moment. The URI is the WSDL URI representation of the HTTP protocol.

    . rpcin => TYPE|CODE

    . rpcout => TYPE|CODE

    . style => 'document'|'rpc'

    . transport => CODE

      The routine which will be used to exchange the data with the server. This code is usually created by XML::Compile::Transport::SOAPHTTP::compileClient() By default, a transporter compatible to the protocol is created. However, in most cases you want to reuse one (HTTP1.1) connection to a server.

    . transport_hook => CODE

    . use => 'literal'|'encoded'

$obj->compileHandler(OPTIONS)

    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.

    Option  --Default
    callback  <required>
    soap      <required>

    . callback => CODE

    . soap => XML::Compile::SOAP object

Helpers

$obj->canTransport(PROTOCOL, STYLE)

    Returns a trueth value when the pair with URI of the PROTOCOL and processing STYLE (either document or rpc) is provided as soap binding.

$obj->collectFaultParts(ARGS, PORT-OP, BIND-OP)

$obj->collectMessageParts(ARGS, PORT-OP, BIND-OP)

    Collect the components of the message which are actually being used.

$obj->compileMessages(ARGS, 'CLIENT'|'SERVER', SOAP)

$obj->messageSelectParts(MESSAGE, [NAMES])

    Collect the named message parts. If no names are specified, then all are all returned.

SEE ALSO

This module is part of XML-Compile-SOAP distribution version 0.73, built on April 29, 2008. Website: http://perl.overmeer.net/xml-compile/ All modules in this suite: "XML::Compile", "XML::Compile::SOAP", "XML::Compile::SOAP::Daemon", "XML::Compile::Tester", "XML::Compile::Dumper".

Please post questions or ideas to http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile|the mailinglist For life contact with other developers, visit the #xml-compile channal on IRC.

LICENSE

Copyrights 2007-2008 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 http://www.perl.com/perl/misc/Artistic.html