如何删除xsi:nil=";“真的”;从Perl SOAP::Lite服务调用?

如何删除xsi:nil=";“真的”;从Perl SOAP::Lite服务调用?,perl,web-services,soap,soaplite,Perl,Web Services,Soap,Soaplite,下面是使用 当它执行时,它产生这个请求 <?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/en

下面是使用

当它执行时,它产生这个请求

<?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>


有没有办法删除标签上的xsi:nil=“true”?

我找到了答案。似乎这是SOAP:Lite库的一个限制(但很容易修改)。

Hrm,我想我说的对,用XML解析器咀嚼XML是个坏主意,因为SOAP不应该这样做?
<?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>