xml - JAXB XmlSchema.xmlns (in package-info.java) ignored by marshaller -
i need generate xml document starts like:
<document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:xsi= "http://www.w3.org/2001/xmlschema-instance">
as such have modified package-info.java followed:
@javax.xml.bind.annotation.xmlschema( namespace = "urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" , xmlns = { @javax.xml.bind.annotation.xmlns( prefix="xsi" , namespaceuri="http://www.w3.org/2001/xmlschema-instance") } , elementformdefault = javax.xml.bind.annotation.xmlnsform.qualified ) package mypackage; but output is:
<document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02"> i'm not sure start looking everything find says doing...
update: solved using moxy jaxb implementation; code ok, seems problem implementation using :\
i have example below , works correctly. try , if have question, ill try help.
elementformdefault = javax.xml.bind.annotation.xmlnsform.qualified, xmlns = { @xmlns(prefix = "xsi", namespaceuri = "http://www.w3.org/2001/xmlschema-instance") }) regards
Comments
Post a Comment