Disclaimer: same issue has been treated without solution in node_id 806606. I'm trying to integrate a client webservice, that allows ticket opening requests via SOAP. Everything works great, except when I try to attach file in the SOAP::Lite message, using SOAP::Packager and MIME::Entity. I deepened the issue, and I confirm that the problem is caused by the remote server expecting sequences of CRLF and not '\n' for line ending. Here is a snippet of the code I'm using:

.. my $ent = build MIME::Entity Type => "application/octet-stream", Encoding => "binary", Path => "/usr/share/httpd/icons/small/uu.gif", Filename => "uu.gif", Disposition => "attachment", my $method = SOAP::Data->name('OpCreate') ->attr({'Request_Urgency' => $options{'urgency' +}}); my $header = SOAP::Header ->name('AuthenticationInfo' => \SOAP::Header->value(@logininfo) ); print Dumper \$ent; #exit; my $result = SOAP::Lite ->packager(SOAP::Packager::MIME->new) ->parts([$ent]) ->proxy($create_proxy, ssl_opts => [ SSL_verify_mode => 1, S +SL_ca_file => '/root/Firefox_CERT/CUSTOMERROOTCA2'] ) ->call($header, $method => @data) ; ..

I'm looking forward to change things in my code, to generate/change on the fly needed ending characters. I manually test things with curl using raw data coming from SOAP::Lite trace output as raw file input and I confirm that is sufficient to use "unix2dos" on the ASCII part of the resulting file to see things working as expected. Hacky solutions are welcome, Thanks for any hints


In reply to Again on SOAP::Lite, MIME::Entity and SOAP::Packager by ray.rick.mini

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.