Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

JAXB Interview Questions and Answers

Ques 16. Discuss Customization Levels.

Ans. Customizations can be made at four levels
– global
• defined at “top level” in a <jxb:globalBindings> element
• applies to all schema elements in the source schema
and in all included/imported schemas (recursively)
– schema
• defined at “top level” in a <jxb:schemaBindings> element
• applies to all schema elements in the target namespace of the source schema
– definition
• defined in a type or global declaration
• applies to all schema elements that reference the type or global declaration
– component
• defined in a particular schema element or attribute declaration
• applies only to it

Is it helpful? Add Comment View Comments
Ques 17. Discuss Global Bindings attributes.
Ans. • collectionType
– “indexed” (uses array and provides methods to get/set elements) or fully-qualified-java-class-name(must implement java.util.List)
– default is “java.util.ArrayList”
• enableFailFastCheck
– “true” or “false” (default)
– if true, invalid property values are reported as soon as they are set, instead of waiting until validation is requested
– not implemented yet in RI
• generateIsSetMethod
– “true” or “false” (default)
– if true, generates isSet and unSet methods for the property
• underscoreBinding
– “asCharInWord” or “asWordSeparator” (default)
– if “asWordSeparator” , underscores in XML names are removed and words are camel-cased to form Java name
– for example, “gear_shift_knob” goes to “gearShiftKnob”
• bindingStyle (was modelGroupAsClass)
– “modelGroupBinding” or “elementBinding” (default)
• choiceContentProperty
– “true” or “false” (default)
– allows objects to hold one of a number of property choices which may each have a different data type
• enableJavaNamingConventions
– “true” (default) or “false”
• fixedAttributeAsConstantProperty
– “true” or “false” (default)
– if true, “fixed” attributes will be represented as constants
• typesafeEnumBase
– “xsd:string” , “xsd:decimal” , “xsd:float” , “xsd:double” or “xsd:NCName” (default)
– defines field type used to represent enumerated values in generated typesafe enum class
• typesafeEnumMemberName
– “generateName” or “generateError” (default)
– specifies what to do if an enumerated value cannot be mapped to a valid Java identifier
– “generateName” generates names in the form VALUE_#
– “generateError” reports an error
Is it helpful? Add Comment View Comments
Ques 18. What is the syntax of schemaBindings?
Ans. • The syntax for the schemaBindings element is
<jxb:schemaBindings>
<jxb:package [name="package-name"]>
<jxb:javadoc> ... javadoc ... </jxb:javadoc>
</package>
<jxb:nameXmlTransform>
<jxb:typeName prefix="prefix" suffix="suffix"/>
<jxb:elementName prefix="prefix" suffix="suffix"/>
<jxb:modelGroupName prefix="prefix" suffix="suffix"/>
<jxb:anonymousTypeName prefix="prefix" suffix="suffix"/>
</jxb:nameXmlTransform>
</jxb:schemaBindings>
– every element and attribute within schemaBindings is optional
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2020 WithoutBook