I am able to create the attributes with all the xmlns
, however not able to create the attributes below which are non xmlns
like ft:record="true" ft:status=""...
I scanned the java doc and the whole web but cannot find the solution or approach for adding the non xmlns
attributes to the schema header using JAX-B. Do JAX-B have any provision?
<myaccount str:strns="true" ft:record="true" ft:status="" ft:num="0" xmlns:str="urn:ins.com:qmodel:wcpsstructs:v1">
</myaccount>
Below is my package-info.java
:
@XmlSchema(namespace = "urn:ins.com:qmodel:wcpsstructs:v1",
elementFormDefault = XmlNsForm.QUALIFIED,
xmlns={
@XmlNs(namespaceURI="urn:ins.com:qmodel:wcpsstructs:v1", prefix = "str")
})
package com.mypackage.domain.outputspec;
import javax.xml.bind.annotation.*;
My Maven dependencies:
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.7</version>
</dependency>