I will describe, when JAX-WS maps, XML element or attribute declaration to Java primitive wrapper class. Most of the time, during designing/writing schema definition(XSD) for web service, we are not thinking about that XML-to-Java conversion, hence later on it will become a issue while debugging web service.
There are mainly three conditions when XML element or attribute declaration converted to Java primitive wrapper class used by JAX-WS.
- When element declaration contains "minCccurs=0" attribute.
- When element declaration contains "nillable=true" attribute.
- When attribute declaration contains "use=optional" attribute.
In the above element/attribute declaration "short/boolean" primitive datatype is converted to "short/boolean" primitive wrapper class.
No comments:
Post a Comment