I have to add xml schema attributes into the java object.
Such as, my java object is User. This User object will be
represented as XML using JAXB. I generated XML
from User object successfully using JAXB. But I want to add xml schema attributes such as
Expand|Select|Wrap|Line Numbers
- <User
- xmlns="http://testws/rest/schema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://testws/rest/user UserSchema.xsd">
- </User>
I tried with @xmlSchema annotation but it threw the following error:
Package annotations must be in file package-info.java
I would be grateful, if someone help me to solve this issue.