java - JAXB default value for null elements when marshalling -


at time of marshalling of jaxb object want set defult value resulting xml.

i not want use nillable=true generates empty tag unnecessary xsi:nil="true", , not setting default value. instead want generate xml placeholder characters such '?'.

use case : going build tool webservice testing. there need present entire request xml user (like soapui).

use case : going build tool webservice testing. there need present entire request xml user (like soapui).

the idea of place holder character isn't going work. example ? ok default value string, not int, boolean, or complex values (i.e. representing nested address information customer). instead want value reflects type.

then have write large , complex reflection based code. assume not possible in case.

this reflection code won't bad imagining. quick search reveal libraries populate objects "dummy" data. when hooking jaxb leverage marshaller.listener populate object on before marshal event.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -