Try adding [usage="optional"] to the structure tag, like this: <structure name="address" field="address" class="domain.Person " type-ame="tns:OsebaSmal" usage="optional">
Note that your XSD should also match with a [minOccurs="0"]. -----Original Message----- From: TomazM [mailto:tomaz.majerh...@arnes.si] Sent: Friday, June 12, 2009 7:49 AM To: JIBX Subject: [jibx-users] mapping Is there an easy way to not put values in xml if they are null? Example: java: public class Account { private Person person; private Address address; } public class Person { private String name; private String surname; } public class Address { private String city; } binding.xml <mapping abstract="true" class="domain.Account" type-name="tns:AccountSmal"> <structure name="person" field="person" class="domain.Person " type-name="tns:OsebaSmal"> <value name="name" get-method="getName" set-method="setName" /> <value name="surname" get-method="getSurname" set-method="setSurname" /> </structure> <structure name="address" field="address" class="domain.Person " type-name="tns:OsebaSmal"> <value name="city" get-method="getCity" set-method="setCity" /> </structure> </mapping> Is there any possibility that if address is null then jibx don't murshall it, because if address is null then I get jibx exception. Regards, Toamz STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify WHI Solutions immediately at g...@whisolutions.com, and destroy all copies of this message and any attachments. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users