xml - jaxb - marshalled root element with full java package -
im working on project jaxb maven plugin. (maven 3.2.2, maven-jaxb2-plugin:0.8.1, java8)
i use
<bindingincludes> <bindinginclude>...</bindinginclude> </bindingincludes>
for specifing package of generated classes and
<generatedirectory>${project.build.directory}/generated-sources/xjc-dir </generatedirectory>
for specifing output directory.
im trying understand cause marshaller work in 2 different ways:
actual:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <com.test.app.foo> ... </com.test.app.foo>
expected:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <foo> ... </foo>
full java package visible root element.
thanks in advance
edit:
generated code
package com.test.app; @xmlaccessortype(xmlaccesstype.field) @xmltype(name = "", proporder = { (...) }) @xmlrootelement(name = "foo") public class foo { ... }
for any1 seeing similar issues:
in case creating jaxbelement using own qname using 1 of arguments foo.class.getname()
removing jaxbelement totally , passing foo marshaller fixed issue, using foo.class.getsimplename() work
Comments
Post a Comment