Why is it that when I populate a webService with certain fields that are required, the ones that are nillable show up as <tag xsi:nil=true />?

0
I am working with a WSDL and schema that was provided to me and some of the fields are "nilllable" so I don't populate them.  When I capture the output from the execution of the WebService (SOAP) it always puts the tag and xsi:null="true" in the xml instead of just not showing the tag.  How can I get it so that it won't show the tag if it's empty and/or null.
asked
2 answers
0

optional means you can leave the field/tag out

nillable means that you leave the value empty. Some systems require the xsi:null="true" attribute. Most systems accept the <field></field> tag.

 

Edit 1: Consider replacing 'empty' values with empty strings (''). An empty string is a value and empty means 'nothing'. Yes, Confusing....

answered
0

It is really depends on the WSDL. Your element must have 'minOccurs="0"', then when you send your empty value, it will be omitted instead of sending it as an 'xsi:null="true"'. If you have both (optional and nillable), in Mendix you can choose to prioritize optionality.

answered