[Fedora-suds-list] Empty string instead of xsi:nil in request

Piotr Szrajber p.szrajber at ks-software.com
Mon Aug 17 13:06:40 UTC 2009


Hello,

I am trying to invoke a php webservice method which expects one of the  
parameters (for brevity let's call it just "parameter1") as either string  
or null. Unfortunately, when I invoke it in SUDS client, either with  
passing it explicitly as None or when ignoring it:

<pre>
service.method(parameter0, parameter1=None)
service.method(parameter0),
</pre>

I see in debug information that SUDS is sending empty string instead of  
xsi:nil:

<pre>
<SOAP-ENV:Body>
    <ns0:method>
       <parameter0 xsi:type="ns1:integer">325</parameter0>
       <parameter1 xsi:type="ns1:string"/>
    </ns0:method>
</SOAP-ENV:Body>
</pre>

How can I deal with that?

If it's service provider fault, can I somewhat manually filter the request  
to replace "<parameter1 xsi:type="ns1:string"/>" with "<parameter1  
xsi:nil="true"/>"?

Kind Regards,
Piotr Szrajber




More information about the suds mailing list