Hi Chetan,

The way I'd normally handle this in JiBX is by making the values 
optional - that way they'll be skipped completely on marshalling if the 
value is null. If you really need to have the elements present and empty 
for null values, you can do this by using a custom serializer (which if 
passed a null value, just returns an empty string). See 
http://jibx.sourceforge.net/tutorial/binding-extend.html#extmeths

  - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



[EMAIL PROTECTED] wrote:
>
> Hi,
>
> This might be a very trivial question.
>
> I have an object that I am trying to marshall and then lets us say a 
> few of the member variables of my object are null.
> My marshalling fails because of this.What should I do so that 
> marshalling goes through smoothly even if a few member variables 
> within my object are null.
> Ideally I expect to see an empty xml element tag(corressponding to the 
> member variable which is null).
>
> Please let me know how to get this working since my object reflects 
> the values in the database
>
> Regards,
> Chetan
> ------------------------------------------------------------------------
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to