TRANSPORT_CLASS_REGI(9) Device drivers infrastructure TRANSPORT_CLASS_REGI(9)NAME
transport_class_register - register an initial transport class
SYNOPSIS
int transport_class_register(struct transport_class * tclass);
ARGUMENTS
tclass
a pointer to the transport class structure to be initialised
DESCRIPTION
The transport class contains an embedded class which is used to identify it. The caller should initialise this structure with zeros and
then generic class must have been initialised with the actual transport class unique name. There's a macro DECLARE_TRANSPORT_CLASS to do
this (declared classes still must be registered).
Returns 0 on success or error on failure.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 TRANSPORT_CLASS_REGI(9)
Check Out this Related Man Page
SOAP::WSDL::Factory::Transport(3pm) User Contributed Perl Documentation SOAP::WSDL::Factory::Transport(3pm)NAME
SOAP::WSDL::Factory::Transport - Factory for retrieving transport objects
SYNOPSIS
# from SOAP::WSDL::Client:
$transport = SOAP::WSDL::Factory::Transport->get_transport( $url, @opt );
# in transport class:
package MyWickedTransport;
use SOAP::WSDL::Factory::Transport;
# register class as transport module for httpr and https
# (httpr is "reliable http", a protocol developed by IBM).
SOAP::WSDL::Factory::Transport->register( 'httpr' , __PACKAGE__ );
SOAP::WSDL::Factory::Transport->register( 'https' , __PACKAGE__ );
DESCRIPTION
SOAP::WSDL::Transport serves as factory for retrieving transport objects for SOAP::WSDL.
The actual work is done by specific transport classes.
SOAP::WSDL::Transport tries to load one of the following classes:
o the class registered for the scheme via register()
o the SOAP::Lite class matching the scheme
o the SOAP::WSDL class matching the scheme
METHODS
register
SOAP::WSDL::Transport->register('https', 'MyWickedTransport');
Globally registers a class for use as transport class.
proxy
$trans->proxy('http://soap-wsdl.sourceforge.net');
Sets the proxy (endpoint).
Returns the transport for this protocol.
set_transport
Sets the current transport object.
get_transport
Gets the current transport object.
WRITING YOUR OWN TRANSPORT CLASS
Registering a transport class
Transport classes must be registered with SOAP::WSDL::Factory::Transport.
This is done by executing the following code where $scheme is the URL scheme the class should be used for, and $module is the class' module
name.
SOAP::WSDL::Factory::Transport->register( $scheme, $module);
To auto-register your transport class on loading, execute register() in your tranport class (see SYNOPSIS above).
Multiple protocols or multiple classes are registered by multiple calls to register().
Transport plugin package layout
You may only use transport classes whose name is either the module name or the module name with '::Client' appended.
Methods to implement
Transport classes must implement the interface required for SOAP::Lite transport classes (see SOAP::Lite::Transport for details,
SOAP::WSDL::Transport::HTTP for an example).
To provide this interface, transport modules must implement the following methods:
o new
o send_receive
Dispatches a request and returns the content of the response.
o code
Returns the status code of the last send_receive call (if any).
o message
Returns the status message of the last send_receive call (if any).
o status
Returns the status of the last send_receive call (if any).
o is_success
Returns true after a send_receive was successful, false if it was not.
SOAP::Lite requires transport modules to pack client and server classes in one file, and to follow this naming scheme:
Module name:
"SOAP::Transport::" . uc($scheme)
Client class (additional package in module):
"SOAP::Transport::" . uc($scheme) . "::Client"
Server class (additional package in module):
"SOAP::Transport::" . uc($scheme) . "::Client"
SOAP::WSDL does not require you to follow these restrictions.
There is only one restriction in SOAP::WSDL:
You may only use transport classes whose name is either the module name or the module name with '::Client' appended.
SOAP::WSDL will try to instantiate an object of your transport class with '::Client' appended to allow using transport classes written for
SOAP::Lite.
This may lead to errors when a different module with the name of your transport module suffixed with ::Client is also loaded.
LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself
AUTHOR
Martin Kutter <martin.kutter fen-net.de>
REPOSITORY INFORMATION
$Rev: 851 $
$LastChangedBy: kutterma $
$Id: Transport.pm 851 2009-05-15 22:45:18Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
perl v5.10.1 2010-12-21 SOAP::WSDL::Factory::Transport(3pm)