.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SOAP::WSDL::Factory::Transport 3pm" .TH SOAP::WSDL::Factory::Transport 3pm "2022-10-14" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SOAP::WSDL::Factory::Transport \- Factory for retrieving transport objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # 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( \*(Aqhttpr\*(Aq , _\|_PACKAGE_\|_ ); \& SOAP::WSDL::Factory::Transport\->register( \*(Aqhttps\*(Aq , _\|_PACKAGE_\|_ ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" SOAP::WSDL::Transport serves as factory for retrieving transport objects for \&\s-1SOAP::WSDL.\s0 .PP The actual work is done by specific transport classes. .PP SOAP::WSDL::Transport tries to load one of the following classes: .IP "\(bu" 4 the class registered for the scheme via \fBregister()\fR .IP "\(bu" 4 the SOAP::Lite class matching the scheme .IP "\(bu" 4 the \s-1SOAP::WSDL\s0 class matching the scheme .SH "METHODS" .IX Header "METHODS" .SS "register" .IX Subsection "register" .Vb 1 \& SOAP::WSDL::Transport\->register(\*(Aqhttps\*(Aq, \*(AqMyWickedTransport\*(Aq); .Ve .PP Globally registers a class for use as transport class. .SS "proxy" .IX Subsection "proxy" .Vb 1 \& $trans\->proxy(\*(Aqhttp://soap\-wsdl.sourceforge.net\*(Aq); .Ve .PP Sets the proxy (endpoint). .PP Returns the transport for this protocol. .SS "set_transport" .IX Subsection "set_transport" Sets the current transport object. .SS "get_transport" .IX Subsection "get_transport" Gets the current transport object. .SH "WRITING YOUR OWN TRANSPORT CLASS" .IX Header "WRITING YOUR OWN TRANSPORT CLASS" .SS "Registering a transport class" .IX Subsection "Registering a transport class" Transport classes must be registered with SOAP::WSDL::Factory::Transport. .PP This is done by executing the following code where \f(CW$scheme\fR is the \s-1URL\s0 scheme the class should be used for, and \f(CW$module\fR is the class' module name. .PP .Vb 1 \& SOAP::WSDL::Factory::Transport\->register( $scheme, $module); .Ve .PP To auto-register your transport class on loading, execute \fBregister()\fR in your tranport class (see \s-1SYNOPSIS\s0 above). .PP Multiple protocols or multiple classes are registered by multiple calls to \&\fBregister()\fR. .SS "Transport plugin package layout" .IX Subsection "Transport plugin package layout" You may only use transport classes whose name is either the module name or the module name with '::Client' appended. .SS "Methods to implement" .IX Subsection "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). .PP To provide this interface, transport modules must implement the following methods: .IP "\(bu" 4 new .IP "\(bu" 4 send_receive .Sp Dispatches a request and returns the content of the response. .IP "\(bu" 4 code .Sp Returns the status code of the last send_receive call (if any). .IP "\(bu" 4 message .Sp Returns the status message of the last send_receive call (if any). .IP "\(bu" 4 status .Sp Returns the status of the last send_receive call (if any). .IP "\(bu" 4 is_success .Sp Returns true after a send_receive was successful, false if it was not. .PP SOAP::Lite requires transport modules to pack client and server classes in one file, and to follow this naming scheme: .PP .Vb 2 \& 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" .Ve .PP \&\s-1SOAP::WSDL\s0 does not require you to follow these restrictions. .PP There is only one restriction in \s-1SOAP::WSDL:\s0 .PP You may only use transport classes whose name is either the module name or the module name with '::Client' appended. .PP \&\s-1SOAP::WSDL\s0 will try to instantiate an object of your transport class with \&'::Client' appended to allow using transport classes written for SOAP::Lite. .PP This may lead to errors when a different module with the name of your transport module suffixed with ::Client is also loaded. .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2004\-2007 Martin Kutter. All rights reserved. .PP This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself .SH "AUTHOR" .IX Header "AUTHOR" Martin Kutter .SH "REPOSITORY INFORMATION" .IX Header "REPOSITORY INFORMATION" .Vb 4 \& $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 $ .Ve