java - No use of nillable="0" in SOAP Webservice -


i have received xsd 3rd party supplier generated java based system; used create soap endpoint receive data transfers. xsd not make use of nillable attribute defined within w3c/xsd namespace, example:

<xs:complextype name="customer">     <xs:sequence>         <xs:element minoccurs="1" maxoccurs="1" name="id" type="xs:integer"/>         <xs:element minoccurs="0" maxoccurs="1" name="titleid" type="xs:integer"/>         <xs:element minoccurs="0" maxoccurs="1" name="firstname" type="xs:string"/>         <xs:element minoccurs="0" maxoccurs="1" name="familyname" type="xs:string"/>         <xs:element minoccurs="0" maxoccurs="1" name="previousname" type="xs:string"/>         <xs:element minoccurs="0" maxoccurs="1" name="dateofbirth" type="xs:date"/>     </xs:sequence> </xs:complextype> 

when speaking supplier mentioned "where minoccurs="0" , no value, elements omitted".

when use xsd schema definition tool create classes; classes generated correctly 2 exceptions: dateofbirth , titleid properties not nullable.

unless nillable="true" declared within xsd simple types, value types or not created nullable despite minoccurs="0" configuration. after research feel interpretation correct given information in following articles:

i have concluded above minoccurs="0" definition states element within xml optional, not have particular meaning. clear within soap message; communicate no value particular element nill="true" should used within empty element.

when presenting our supplier; have argued missing nillable attributes leaves xsd ambiguous , lacks intent when referenced standards, given omitting elements not state null, implied. w3c states if message needs indicate element null, should explicitly stated. representative disagreed , argued if there no dateofbirth (for example) remove element in soap message. believe acceptable , conforms standards. have read here, minoccurs/nillable have same behavior in java (maybe why feel don't have use nillable attribute)

i know can work around ultimately; (potentially) has significant increase on amount of additional code required sake of our supplier not wanting use nill/nillable attribute in xsd , soap message. building our soap api in wcf; upon deserialization have check specified properties generated check missing elements. because value types not not referenced in xml message assigned default values. alternatively, go through xsd , add them myself, feel bad idea. changing definitions , new releases require same effort, every 3-6 months.

my questions are:

  • are arguments correct? if not, why?
  • am correct in suggestion java treats these configurations same?
  • if wrong, there way can tell .net create nullable types minoccurs="0"?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -