Monday, January 6, 2014

Fields not getting serialized in econnect

Found these out the hard way.

Reason 1 - no default 
If you have numeric fields, such as int, short, decimal, etc.. you need default values otherwise they won't get serialized.

For example:
<xs:element minOccurs="0" maxOccurs="1" default="0"  name="SEQNUMBR" type="xs:int"/>

Before putting that in that field was simply not getting serialized and thus didn't end up in the XML Doc submitted to eConnect

Reason 2 - first field has minOccurs = 0. 

Apparently the first field in the XML node needs to have minOccurs = 1. It is simply ignoring fields before the first occurence of "minOccurs=1"

No comments:

Post a Comment