4865receiving MIME attachments
- Aug 24, 2005Hi,
New to this group..-)
Plus warning: this is rather a long post!
Found the situation around receiving attachments in SOAP::LITE a bit
confusing. Hence this email, in an effort to help future soulmates.
Officially since version 6.0a of SOAP::LITE the use of the additional
patch module SOAP::MIME should be no longer required. But here is what
I'm a ActivePerl user and in ASPerl 5.8 the default core module
SOAP::Lite is version 5.3.
I needed to write some client code that accessed a service that needed
support for attachments.
So I downloaded version 6.0a PPM module from the Randy Kobes archives
and installed that.
But I could not get attachments to work.
No error message, just an undef when using the ->parts method.
Some hours later, 2 things are clear:
it turns out that are some dependencies in order to get the SOAP::SOM
object to work correctly in the case of attachments.
- MIME::Tools (which includes the needed MIME::Parser)
MIME::Tools from its part, needs:
I find it just a bit strange that these dependencies are not noted
when loading the PPM module (normally PPM will autoload the missing
modules for you) (and yes the 'follow-install' option was set to true)
2. Still need SOAP::Mime if version of SOAP::Lite < 0.65_5
For SOAP::Lite version 0.60a I still needed SOAP::MIME in order to get
things to work properly.
Version 0.65_5 seemed to work OK.
Although there are some small differences whether one uses the
SOAP::MIME or not:
- using SOAP::MIME one needs to recreate the soap object for every
function (using attachments?) otherwise program dies with the
Can't call method "print" on an undefined value at
C:/Perl/site/lib/MIME/Entity.pm line 1855.
- using SOAP::MIME one uses:
to get to the content
without SOAP::MIME one has to use:
But all seems to work well now...