[jboss-dev-forums] [Design of JBossXB] - about JBMETA 198/199
jeff.zhang
do-not-reply at jboss.com
Mon May 18 05:48:52 EDT 2009
anonymous wrote :
| > > The problem is there is no way to specify the namespace for the root
| > > element. So, this approach (hack in fact) will only work for DTDs and
| > > schemas with default namespace. Which is not your case.
| > > You can continue hacking by wrapping your metadata classes (I think just
| > > wrapping the root class will be sufficient) and bind these wrappers to
| > > the default namespace and then use that in the -beans.xml binding file.
|
1. extend the JCA15MetaData and JBossRAMetaData classes and create 2 wrap classes. in which I define the namespace in the class by using annotation @JBossXmlSchema, is it correct?
2. define SchemaConfig that binding xsd file and metadata class, like
| <entry>
| <key>connector_1_5.xsd</key>
| <value>org.jboss.metadata.rar.spec.JCA15MetaData</value>
| </entry>
|
In metadata project, we don't import MC project, so I can add this bind into MetaDataSchemaResolverFactory class like:
| resolver.mapLocationToClass("connector_1_5.xsd", JCA15MetaData.class);
|
but the map key "connector_1_5.xsd" is used, how could I bind xsd file into new wrap class?
thanks a lot
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231558#4231558
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231558
More information about the jboss-dev-forums
mailing list