View on
Mark Overmeer > XML-Compile-SOAP-AnyEvent-0.01 > XML::Compile::Transport::SOAPHTTP_AnyEvent



Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  


XML::Compile::Transport::SOAPHTTP_AnyEvent - exchange XML via AnyEvent::HTTP


 use XML::Compile::Transport::SOAPHTTP_AnyEvent;

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

 my $call = $wsdl->compileClient
   ( operation => 'some-port-name'
   , transport => $send
   , async     => 1      # required!

 sub handler
   { my ($xmlout, $trace) = @_;
     # so something

 $call->($xmlin, _callback => \&handler);


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.

In contrairy to XML::Compile::Transport::SOAPHTTP, this implementation can be used in various event-driven environments, via AnyEvent::HTTP.



 Option          --Default
 any_event_params  []

. any_event_params => ARRAY

Options passed to AnyEvent::HTTP, for instance timeout and proxy. The ARRAY is a list of PAIRS.





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   --Default
 action     ''
 header     <created>
 kind       'request-response'
 method     'POST'
 mime_type  <depends on soap version>
 mpost_id   42
 soap       'SOAP11'

. action => URI

. header => HTTP::Headers object

Versions of XML::Compile, XML::Compile::SOAP, and LWP will be added to simplify bug reports.

. 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



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.


This module is part of XML-Compile-SOAP-AnyEvent distribution version 0.01, built on November 01, 2010. Website:

All modules in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::SOAP::WSA, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, and XML::Rewrite, XML::eXistDB, XML::LibXML::Simple.

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


Copyrights 2010 by Aleksey Mashanov/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

syntax highlighting: