I've now have this:
| <jboss-include xmlns="urn:jboss:include:1.0" name="mymetadata"
xmlns:xi="http://www.w3.org/2001/XInclude">
|
| <jboss-test>test1</jboss-test>
| <xi:include href="included.xml"/>
|
| </jboss-include>
|
where included.xml is
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-test>test2</jboss-test>
|
If I comment out include in the first xml, I'm fine with parsing.
But if I use it, then I get this:
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: jboss-test
not found as a child of {urn:jboss:include:1.0}jboss-include
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:201)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:181)
| at
org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:190)
| at
org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:164)
| at
org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
| at
org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
| at
org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:185)
| at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:336)
|
Where my metadata is:
| @JBossXmlSchema(namespace="urn:jboss:include:1.0",
elementFormDefault=XmlNsForm.QUALIFIED)
| @XmlRootElement(name="jboss-include", namespace =
"urn:jboss:include:1.0")
| @XmlType(
| name="includeType",
| namespace="urn:jboss:include:1.0",
| propOrder={"others"}
| )
| public class IncludeMetaData implements Serializable
| {
| /** The serialVersionUID */
| private static final long serialVersionUID = 1L;
|
| private String name;
| private List<TestMetaData> others;
|
| public String getName()
| {
| return name;
| }
|
| @XmlAttribute(required = true)
| public void setName(String name)
| {
| this.name = name;
| }
|
| public List<TestMetaData> getOthers()
| {
| return others;
| }
|
| @XmlElement(name = "jboss-test")
| public void setOthers(List<TestMetaData> others)
| {
| this.others = others;
| }
| }
|
| @JBossXmlSchema(namespace="urn:jboss:mytest:1.0",
elementFormDefault=XmlNsForm.QUALIFIED)
| @XmlRootElement(name="jboss-test")
| public class TestMetaData implements Serializable
| {
| /** The serialVersionUID */
| private static final long serialVersionUID = 1L;
| private String name;
|
| public String getName()
| {
| return name;
| }
|
| @XmlAttribute(required = true)
| public void setName(String name)
| {
| this.name = name;
| }
| }
|
What am I missing?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157274#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...