[Fedora-suds-list] optional elements

Yi Qiang yqiang at gmail.com
Wed May 20 23:21:26 UTC 2009


Hi,
The WSDL I am trying to use suds with is a bit annoying in that it defines
certain elements as REQUIRED but read only. For example, it will have
something like the following:

<s:element minOccurs="1" maxOccurs="1" name="fDefault" type="s:boolean"/>

So when suds generates the SOAP request, it will put the following as a
default:

<ns0:fDefault xsi:nil="true"/>

Then the server complains that this is not valid. If I set this to say
"true" or "false", the server complains that this field is read only.

The only way I've been able to work around this is to download the WSDL from
the server, make that element optional by changing "minOccurs" to 0.

Is there anyway to tell suds to not put default elements? I.e., only create
XML elements that I specifically ask for?

Thanks,
Yi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-suds-list/attachments/20090520/e276ed99/attachment.htm>


More information about the fedora-suds-list mailing list