ptum has asked for the wisdom of the Perl Monks concerning the following question:
I'm using SOAP::Lite in a client which consumes a SOAP service over which I have no control. Traditionally, I've used code like this:
my $response; eval { $response = $soap_handle->call('MyMethod', $security_token, $datagra +m); }}; if ($@) { print "Error: SOAP call died: $@. \n"; }
When the method doesn't call for any arguments, I just pass undef in $datagram, and it worked just fine, producing XML like this:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope blah blah blah> <soapenv:Header> <wsse:Security blah><blah>blah</blah></wsse:Security> </soapenv:Header> <soapenv:Body> <MyMethod xsi:nil="true" /> </soapenv:Body> </soapenv:Envelope>
Recently, the vendor has updated their web service, and they no longer accept the xsi:nil="true" attribute.
How can I suppress that nil attribute using SOAP::Lite, so that my tag looks more like this?
<soapenv:Body> <MyMethod/> </soapenv:Body>
No good deed goes unpunished. -- (attributed to) Oscar Wilde
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Suppressing nil attribute in empty SOAP tag
by Anonymous Monk on Oct 13, 2011 at 03:45 UTC | |
Re: Suppressing nil attribute in empty SOAP tag
by gnork (Scribe) on Mar 14, 2012 at 15:06 UTC |
Back to
Seekers of Perl Wisdom