XML::C...OAPHTTP(3pm)
π XML::Compile::Transport::SOAPHTTP π
okay bestie, welcome to XML::C...OAPHTTP(3pm) β yeah the man name got elided by the man page formatter, it's just a vibe, don't worry about it π«Ά. This is the page where we exchange XML-SOAP over HTTP. Buckle up. β¨
πΈ NAME πΈ
XML::Compile::Transport::SOAPHTTP β exchange XML-SOAP via HTTP π
π¦ INHERITANCE π¦
XML::Compile::Transport::SOAPHTTP
is a XML::Compile::Transport
is a XML::Compile::SOAP::Extension
so it's giving legacy, it's giving extension, it's giving transport. the whole family tree, periodt. π
β¨ SYNOPSIS β¨
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);
π DESCRIPTION π
This module handles the exchange of (XML) messages, according to the rules of SOAP (any version). any version!! she's flexible. π§
But listen β the module does not know how to parse or compose XML, bestie. She only worries about the HTTP aspects. That's it. That's her job. Stay in your lane, iconic behavior honestly. π
Extends "DESCRIPTION" in XML::Compile::Transport.
π METHODS π
Extends "METHODS" in XML::Compile::Transport.
π Constructors
Extends "Constructors" in XML::Compile::Transport.
XML::Compile::Transport::SOAPHTTP->new(%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().
β οΈ Warning: Thessl_opts,keep_aliveandtimeoutoptions are only used when an default internalLWP::UserAgentis created; this is only once in a program. Later instantiations of this::SOAPHTTPwill share that default agent, even though these passed parameters have different parameters. If that is not what you want, then pass your ownuser_agentobject to the constructor to avoid the use of the default. fr fr this one bites people, read it twice. π
-Option --Defined in --Default
address XML::Compile::Transport 'http://localhost'
charset XML::Compile::Transport 'UTF-8'
keep_alive <true>
ssl_opts <undef>
timeout 180
user_agent <created when needed>
address=>URI|ARRAY-of-URIcharset=>STRINGkeep_alive=>BOOLEANβ When connection can be re-used. lowkey efficient queen. π₯ssl_opts=>HASHβ [3.28] In case you need to use https, but are not interested in checking (or even configuring) certificates, you may want to pass"verify_hostname => 0".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. π (memory leaks are NOT the vibe)user_agent=>LWP::UserAgentobject β If you do not pass your own user agent, a default will be created for you. β¨
π WSDL11
Extends "WSDL11" in XML::Compile::Transport.
$obj->wsdl11Init($wsdl, $args)
XML::Compile::Transport::SOAPHTTP->wsdl11Init($wsdl, $args)
Inherited, see "WSDL11" in XML::Compile::SOAP::Extension. she's not doing anything new here, she's just vibing. π¦
π« SOAP11
Extends "SOAP11" in XML::Compile::Transport.
$obj->soap11ClientWrapper($operation, $call, $args)
Inherited, see "SOAP11" in XML::Compile::SOAP::Extension.
$obj->soap11HandlerWrapper($operation, $callback, $args)
Inherited, see "SOAP11" in XML::Compile::SOAP::Extension.
$obj->soap11OperationInit($operation, $args)
XML::Compile::Transport::SOAPHTTP->soap11OperationInit($operation, $args)
Inherited, see "SOAP11" in XML::Compile::SOAP::Extension.
π« SOAP12
Extends "SOAP12" in XML::Compile::Transport.
$obj->soap12ClientWrapper($operation, $call, $args)
Inherited, see "SOAP12" in XML::Compile::SOAP::Extension.
$obj->soap12HandlerWrapper($operation, $callback, $args)
Inherited, see "SOAP12" in XML::Compile::SOAP::Extension.
$obj->soap12OperationInit($operation, $args)
XML::Compile::Transport::SOAPHTTP->soap12OperationInit($operation, $args)
Inherited, see "SOAP12" in XML::Compile::SOAP::Extension.
π Accessors
Extends "Accessors" in XML::Compile::Transport.
$obj->address()
Inherited, see "Accessors" in XML::Compile::Transport.
$obj->addresses()
Inherited, see "Accessors" in XML::Compile::Transport.
$obj->charset()
Inherited, see "Accessors" in XML::Compile::Transport.
$obj->defaultUserAgent()
XML::Compile::Transport::SOAPHTTP->defaultUserAgent()
[3.07] Returns the used LWP::UserAgent, available after the compilation of the SOAP call(s). π«Ά
$obj->userAgent( [$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. whenever, wherever, she does not gatekeep. π
π οΈ Handlers
Extends "Handlers" in XML::Compile::Transport.
$obj->compileClient(%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
action ''
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=>URIheader=>HTTP::Headersobject β Versions ofXML::Compile,XML::Compile::SOAP, and LWP will be added to simplify bug reports. π (thank u for the receipts bestie)hook=>CODEkind=>DIRECTIONβ What kind of interactie, based on the four types defined byWSDL(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=>STRINGmpost_id=>INTEGERβ With method"M-POST", the header extension fields require (any) number to be grouped. 42, iconic number, no notes. β¨soap=>'SOAP11'|'SOAP12'|OBJECTxml_format=>0|1|2
β¨ example: create a client β¨
my $trans = XML::Compile::Transport::SOAPHTTP->new
( address => 'http://www.stockquoteserver.com/StockQuote'
);
my $call = $trans->compileClient
( action => 'http://example.com/GetLastTradePrice'
);
# $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
$obj->headerAddVersions($header)
XML::Compile::Transport::SOAPHTTP->headerAddVersions($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. π
π DETAILS π
Extends "DETAILS" in XML::Compile::Transport.
π§ Helpers
Extends "Helpers" in XML::Compile::Transport.
XML::Compile::Transport::SOAPHTTP->register($uri)
Inherited, see "Helpers" in XML::Compile::Transport.
π SEE ALSO π
This module is part of XML-Compile-SOAP distribution version 3.28, built on August 01, 2022. Website: http://perl.overmeer.net/CPAN/ π¦
π LICENSE π
Copyrights 2007-2022 by [Mark Overmeer <markov@cpan.org>]. 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://dev.perl.org/licenses/ π
and that's the whole page bestie!! ππ cute lil sign-off: this was perl v5.34.0, dated 2022-08-04, and it lives under the man name XML::C...OAPHTTP(3pm) β slay, go ship some SOAP, periodt. π
β¨πΈ
π¦ where this page comes from
- debian bookworm: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms