![]() |
![]()
| ![]() |
![]()
NAMEXML::Compile::XOP - MTOM and XOP handler SYNOPSIS# by default, XML::Compile encodes binary data my $answer = $call->(image => $binary_image); # to enable use of MTOM use XML::Compile::XOP; my $xop = XML::Compile::XOP->new; my $xop_image = $xop->bytes($binary_image); my $answer = $call->(image => $xop_image); # returned XOPs in SOAP my ($answer, $trace, $xop) = $wsdl->call($operation)->(%data); print $_->string for @$xop; # See XML::Compile::XOP::Include DESCRIPTIONThe SOAP Message Transmission Optimization Mechanism (MTOM) is designed for SOAP1.2, but also usable for SOAP1.1. It optimizes the transport of binary information (like images) which are part of the XML message: in stead of base64 encoding them adding 25% to the size of the data, these binaries are added as pure binary attachment to the SOAP message. In the official specification, the XML message will be created first with the base64 representation of the data in it. Only at transmission, a preprocessor XOP (XML-binary Optimized Packaging) extracts those components to be send separately. In Perl, we have to be more careful about performance. Therefore, the path via encoding to base64 and then decoding it back to binary in the sender (and the reverse process for the receiver) is avoided. METHODSConstructors
DETAILSSEE ALSOSEE ALSOThis module is part of XML-Compile-SOAP distribution version 3.28, built on August 01, 2022. Website: http://perl.overmeer.net/CPAN/ LICENSECopyrights 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/
|