Hi Lev, you could use HTML::Entities.
my $payload = '<?xml version="1.0" encoding="utf-8"?><block>some data</block>';
encode_entities( $payload )
$som = $soap->call( SOAP::Data->name('Request') => $data );
generates a request like this...
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi= blah blah blah .... >
On 2/15/07, Dave Howorth <dhoworth@...> wrote:
> Lev Lvovsky wrote:
> > Hello,
> > I'm rather new to the SOAP world, so if this is a FAQ, please let me
> > know.
> > We're working with a SOAP method "Request", which requires that the
> > payload (literally a block inside the "Request" block) be an XML
> > encoded (> and <) block of text, like the following:
> > ...headers...
> > <Request>
> > <payload >
> > <?xml version="1.0" encoding="utf-8"?>
> > <block></block>
> > </payload>
> > </Request>
> > Putting together the XML message with the SOAP::Data package
> > doesn't allow me to do this.
> > Should I use an external Perl XML package to put together a valid bit
> > of XML for this portion, or am I missing something fundamental?
> I believe you'll need to encode the XML yourself before giving it to
> SOAP::Lite. It doesn't do anything itself, AFAIK.
> In my limited experience, the easiest way is to base64 encode it. I
> posted a thread called "how to use base64" last August about how I did that.
> Cheers, Dave
> Yahoo! Groups Links