NAME
XML::Compile::SOAP::Operation - defines a possible SOAP interaction
INHERITANCE
SYNOPSIS
# created by XML::SOAP::WSDL
### this implementation has not yet finished
DESCRIPTION
These objects are created by XML::SOAP::WSDL, 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::SOAP::SOAP11 directly, and forget WSDL complexity.
There are two styles of SOAP: document-style and XML-RPC. The former can be used directly, for the XML-RPC will require you to specify explicitly a prototype for the call. See XML::Compile::SOAP::Operation subroutine rpcPrototype ???
TODO: translate objects into calls to readers and writers
METHODS
Constructors
$obj->new(OPTIONS)
The OPTIONS are all collected from the WSDL description by XML::Compile::WSDL::operation(). End-users should not attempt to initiate this object directly.
Option --Default
bindOperation undef
binding <required>
port <required>
portOperation <required>
portType <required>
protocol 'HTTP'
schemas <required>
service <required>
soapStyle 'document'
. bindOperation => HASH
. binding => HASH
. port => HASH
. portOperation => HASH
. portType => 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.
. schemas => XML::Compile::Schema
object
. service => HASH
. soapStyle => 'document'|'rpc'
Accessors
$obj->bindOperation
$obj->bindings
$obj->port
$obj->portOperation
$obj->portType
$obj->schemas
$obj->service
Use
$obj->action
Returns the soapAction
and style
attributes, when available.
$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.
$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->prepare(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
protocol new(protocol)
role 'CLIENT'
soapStyle new(soapStyle)
. protocol => URI|'HTTP'
. role => 'CLIENT'|'SERVER'
Of course, when you interact between two systems, then you need to define whether you are the sender or receiver of the data.
. soapStyle => 'document'||'rpc'
$obj->soapNamespace
SEE ALSO
This module is part of XML-Compile distribution version 0.54, built on September 14, 2007. Website: http://perl.overmeer.net/xml-compile/
LICENSE
Copyrights 2006-2007 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