#!/usr/bin/perl package Attachment; use SOAP::Lite; use MIME::Entity; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Server::Parameters); sub someMethod { my $self = shift; my $envelope = pop; my $ent; $ent = build MIME::Entity Id => "<1234>", Type => "image/gif", Encoding => "base64", Path => "some.gif", Filename => "goit.gif", Disposition => "attachment"; return $ent,SOAP::Data->name( "foo" => "bar" ),$ent; } 1;