jibx-users  

[jibx-users] Ignoring test-method?

Dees, Ian (GE Healthcare)
Wed, 09 Jul 2008 06:00:56 -0700

Hi List,

My binding file looks something like this:

<mapping name="info" class ="a.b.c">
  <structure get-method="getName" test-method="hasName" usage="optional"
/>
</mapping>

However, due to constraints on the Java side, a.b.c.getName() will never
return null (it follows the "null object" pattern). hasName() will
return false when the structure should not be there, but the resulting
XML always contains the node. If hasName() returns false, the node is
empty, but still there.

I'm trying to not marshall the structure at all if hasName() returns
false. What am I missing?

Thanks,
Ian

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
  • [jibx-users] Ignoring test-method? Dees, Ian (GE Healthcare)