All of this is done using JAXB annotations. The values โโbelow apply to your domain model.
Circuit level
You can specify schema level namespace information using the @XmlSchema package level annotation:
@XmlSchema(namespace = "http://www.example.org",
elementFormDefault = XmlNsForm.QUALIFIED)
package org.example;
import javax.xml.bind.annotation.XmlSchema;
import javax.xml.bind.annotation.XmlNsForm;
The aforementioned FormDefault annotation anchor will use the namespace of all elements in " http://www.example.org " by default .
Type Level
@XmlType:
@XmlType(namespace="http://www.example.org/foo")
/
/ :
- @XmlAttribute ( = "http://www.example.org/bar" )
- @XmlElement ( = "http://www.example.org/bar" )
- @XmlElementWrapper ( = "http://www.example.org/bar" )
- @XmlRootElement ( = "http://www.example.org/bar" )
, :