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.

    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->prepareServer(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.

    Returned is a LIST of three: the soapAction string, the request decoder CODE reference, and the answer encoder CODE reference.

    Option--Default
    soap    <required>

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

Helpers

$obj->canTransport(PROTOCOL, STYLE)

    Returns a true value when the pair with URI of the PROTOCOL and processing style (either document (default) or rpc) is provided as soap binding. If the style was not specified explicitly with new(style), it will be looked-up. The style is returned as trueth value.

$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.67, built on February 08, 2008. Website: http://perl.overmeer.net/xml-compile/

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