Search code examples
perlweb-servicessoapsoaplite

How to remove the xsi:nil="true" from Perl SOAP::Lite service call?


Here's the code using SOAP::Lite

my $lookup = SOAP::Lite->service('http://hostname.com/path/SpringVerifierWebServicePort?wsdl')
    -> proxy("$theURL") ;
$response = $lookup->verifySpring();

When it executes it produces this request

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<verifySpring xmlns="http://webservice.springverifier.toolslang.fedins.com" xsi:nil="true" />
</soap:Body>
</soap:Envelope>

Is there a way to remove the xsi:nil="true" on the tag?


Solution

  • I found the answer. Seems as if it’s a limitation of the SOAP:Lite library (but is easily modifiable). http://www.perlmonks.org/?node_id=931103