Suppressing xsi:nil=true in body of parameterless calls
- Hi List,
I have to call a Webservice named GetManufacturers that does not accept any
Unfortunately SOAP::LIte (0.714) generates <admin:GetManufacturers
xsi:nil="true" /> instead of <admin:GetManufacturers/> in the SOAP Body, which
is not accpetd by the SOAP server.
All I found so far on the web is the hint to create my own serializer to solve
this. I dont think this will solve my problem as I dont want to change the
behaviour of SOAP::Lite with regard to serialization of an undefined parameter
but rather want to skip the parameter serialization for parameterless method
After some UTSL I changed line 1593 in SOAP::LIte from
$body->set_value($parameters ? \$parameters : SOAP::Utils::encode_data()) if
$body->set_value($parameters, \$parameters) if $body && $parameters;
which results in the "correct" body tag as described above.
I would like to know if there is a better way to achieve this or if not,
whether we could make this behaviour configuration dependend lets say over a
method call like $handle->suppress_nils_in_parameterless_calls(1|0) as
already implemented for calls like $handle->use_default_ns()
Polymer physicists are into chains.