Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  XML::COMPILE::TRANSPORT::SOAPHTTP (3)

.ds Aq ’


XML::Compile::Transport::SOAPHTTP - exchange XML-SOAP via HTTP



   is a XML::Compile::Transport
   is a XML::Compile::SOAP::Extension


 use XML::Compile::Transport::SOAPHTTP;

 my $http = XML::Compile::Transport::SOAPHTTP->new(@options);
 my $send = $http->compileClient(@options2);

 my $call = $wsdl->compileClient
   ( operation => some-port-name
   , transport => $send

 my ($xmlout, $trace) = $call->($xmlin);

 $wsdl->compileCalls(transport => $send);


This module handles the exchange of (XML) messages, according to the rules of SOAP (any version). The module does not known how to parse or compose XML, but only worries about the HTTP aspects.

Extends DESCRIPTION in XML::Compile::Transport.


Extends METHODS in XML::Compile::Transport.


Extends Constructors in XML::Compile::Transport.
XML::Compile::Transport::SOAPHTTP-><B>newB>(%options) Create a SOAP-over-HTTP handler, implemented as a wrapper around LWP::UserAgent.

If you need to change UserAgent settings (for instance at runtime), you can always directly access the internal LWP::UserAgent object via userAgent().

<B>Warning:B> The keep_alive and timeout options are only used when an default internal LWP::UserAgent is created; this is only once in a program. Later instantiations of this ::SOAPHTTP will share that default agent, even though these passed parameters have different parameters. If that is not what you want, then pass your own user_agent object to the constructor to avoid the use of the default.

 -Option    --Defined in             --Default
  address     XML::Compile::Transport  http://localhost
  charset     XML::Compile::Transport  utf-8
  keep_alive                           <true>
  timeout                              180
  user_agent                           <created when needed>

address => URI|ARRAY-of-URI
charset => STRING
keep_alive => BOOLEAN When connection can be re-used.
timeout => SECONDS The maximum time for a single connection before the client will close it. The server may close it earlier. Do not set the timeout too long, because you want objects to be cleaned-up.
user_agent => LWP::UserAgent object If you do not pass your own user agent, a default will be created for you.


Extends WSDL11 in XML::Compile::Transport.
$obj-><B>wsdl11InitB>($wsdl, $args)
XML::Compile::Transport::SOAPHTTP-><B>wsdl11InitB>($wsdl, $args) Inherited, see WSDL11 in XML::Compile::SOAP::Extension


Extends SOAP11 in XML::Compile::Transport.
$obj-><B>soap11ClientWrapperB>($operation, $call, $args) Inherited, see SOAP11 in XML::Compile::SOAP::Extension
$obj-><B>soap11HandlerWrapperB>($operation, $callback, $args) Inherited, see SOAP11 in XML::Compile::SOAP::Extension
$obj-><B>soap11OperationInitB>($operation, $args)
XML::Compile::Transport::SOAPHTTP-><B>soap11OperationInitB>($operation, $args) Inherited, see SOAP11 in XML::Compile::SOAP::Extension


Extends SOAP12 in XML::Compile::Transport.
$obj-><B>soap12ClientWrapperB>($operation, $call, $args) Inherited, see SOAP12 in XML::Compile::SOAP::Extension
$obj-><B>soap12HandlerWrapperB>($operation, $callback, $args) Inherited, see SOAP12 in XML::Compile::SOAP::Extension
$obj-><B>soap12OperationInitB>($operation, $args)
XML::Compile::Transport::SOAPHTTP-><B>soap12OperationInitB>($operation, $args) Inherited, see SOAP12 in XML::Compile::SOAP::Extension


Extends Accessors in XML::Compile::Transport.
$obj-><B>addressB>() Inherited, see Accessors in XML::Compile::Transport
$obj-><B>addressesB>() Inherited, see Accessors in XML::Compile::Transport
$obj-><B>charsetB>() Inherited, see Accessors in XML::Compile::Transport
XML::Compile::Transport::SOAPHTTP-><B>defaultUserAgentB>() [3.07] Returns the used LWP::UserAgent, available after the compilation of the SOAP call(s).
$obj-><B>userAgentB>( [$agent|<undef, %options>] ) Returns the User Agent which will be used. You may change the configuration of the $agent (the returned LWP::UserAgent object) or provide one yourself. See also new(user_agent).

Changes to the agent configuration can be made before or after the compilation, or even inbetween SOAP calls.


Extends Handlers in XML::Compile::Transport.
$obj-><B>compileClientB>(%options) Compile an HTTP client handler. Returned is a subroutine which is called with a text represenation of the XML request, or an XML::LibXML tree. In SCALAR context, an XML::LibXML parsed tree of the answer message is returned. In LIST context, that answer is followed by a HASH which contains trace information.

 -Option    --Defined in             --Default
  header                               <created>
  hook        XML::Compile::Transport  <undef>
  kind                                 request-response
  method                               POST
  mime_type                            <depends on soap version>
  mpost_id                             42
  soap                                 SOAP11
  xml_format  XML::Compile::Transport  0

action => URI
header => HTTP::Headers object Versions of XML::Compile, XML::Compile::SOAP, and LWP will be added to simplify bug reports.
hook => CODE
kind => DIRECTION What kind of interactie, based on the four types defined by WSDL(1): notification-operation (server initiated, no answer required), one-way (client initiated, no answer required), request-response (client initiated, the usual in both directions), solicit-response (server initiated challenge).
method => ’POST’|’M-POST With POST, you get the standard HTTP exchange. The M-POST is implements the (Microsoft) HTTP Extension Framework. Some servers accept both, other require a specific request.
mime_type => STRING
mpost_id => INTEGER With method M-POST, the header extension fields require (any) number to be grouped.
soap => ’SOAP11’|’SOAP12’|OBJECT
xml_format => 0|1|2

example: create a client

 my $trans = XML::Compile::Transport::SOAPHTTP->new
   ( address =>

 my $call = $trans->compileClient
   ( action  =>

 # $request and $answer are XML::LibXML trees!
 # see XML::Compile::SOAP::Client::compileClient() for wrapper which
 # converts from and to Perl data structures.

 my ($answer, $trace) = $call->($request);
 my $answer = $call->($request); # drop $trace info immediately

XML::Compile::Transport::SOAPHTTP-><B>headerAddVersionsB>($header) Adds some lines about module versions, which may help debugging or error reports. This is called when a new client or server is being created.


Extends DETAILS in XML::Compile::Transport.


Extends SYNOPSYS in XML::Compile::Transport.


Extends Helpers in XML::Compile::Transport.
XML::Compile::Transport::SOAPHTTP-><B>registerB>($uri) Inherited, see Helpers in XML::Compile::Transport


This module is part of XML-Compile-SOAP distribution version 3.18, built on March 22, 2016. Website:

Please post questions or ideas to the mailinglist at . For live contact with other developers, visit the #xml-compile channel on


Copyrights 2007-2016 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

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 XML::COMPILE::TRANSPORT::SOAPHTTP (3) 2016-03-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.