Return NULL values in optional XSD fields (minOccurs=0)

Hello together,

is there any possibility to handover a null value to an XML (file/message) output/web service call if the field to be transported is optional (minOccurs=0)?

Example: Assume the following XSD

	<complexType name="Type_Bodsdemo8_Params">
		<sequence>
			<element name="string1" type="string"/>
			<element name="string2" type="string" minOccurs="0"/>
		</sequence>
	</complexType>

	<!-- input element for use case create ticket -->
	<element name="Bodsdemo8_Params" type="bds:Type_Bodsdemo8_Params"/>

Now map string1:=null and string2:=null. The outcome XML will be the following

	<ns1:Bodsdemo8_Params>
	<ns1:string1></ns1:string1>
	</ns1:Bodsdemo8_Params>

, which is in some of our use cases not the desired output. Expected is:

	<ns1:Bodsdemo8_Params>
	<ns1:string1></ns1:string1>
	<ns1:string2></ns1:string2>
	</ns1:Bodsdemo8_Params>

.

Fortunately, string2 can be mapped to strings2:=‘‘, which will result the desired answer.

But if one wants to send an optional integer containing a null value, this empty-string trick will not work. Is there any possibility to send a null value for optional integer without changing the WSDL? (Unchecking ‚Optional‘ in the query designer won’t work.)

Nevertheless, I would expect BO DS to clearly distinguish between a nilled and a non-occuring field (nillable=true vs. minOccurs=0), which is obviously not the case. Not mapping a field and mapping a field to null will have the same outcome for optional fields in BODS, which is a semantical difference.

Is it known that this is a BO DS implementation issue or is there another way to handle the described case?

Best thanks,
Sebastian

Versions:
Designer 14.0.3.353
JobServer 14.0.3.353
JobEngine 14.0.3.678
Repository 14.0.0.0000


pose (BOB member since 2013-02-20)