0

I am working on a JMX project and for the purpose of exposing the MBean's attributes and Operations of all the MBeans in my project, I wanted to write an API. For this I needed MBean xsd file with proper namespaces from the provider so that I can use JAXB or XMLBeans to generate java classes for them. I tried google but could only find DTD files or non-standard XSD file without proper namesapces.

Is there a standard XSD available which I can use? Thanks.

Amit
  • 466
  • 6
  • 11

1 Answers1

0

Apache Commons Modeler uses an XML descriptor to do this. However, they do not implement a schema, but they do have a DTD, which should be convertible to a schema for your own uses.

Nicholas
  • 15,916
  • 4
  • 42
  • 66
  • Ya I have this DTD. Before posting here I tried converting this DTD to XSD using toolings but the generated schema lacks namespaces. That's where the issue is. Both JAXB and XMLBeans use the targetNamespace and xml:ns attributes for binding the classes to their packages. When I use XMLBeans, the generated JAR file contains absurd package names like "noNamespace". Any idea how to deal with this issue? – Amit May 13 '11 at 06:52
  • 1
    I guess it is more of an XML issue than a JMX issue, per se. I suppose you could work up your own namespace enabled schema and use XSLT to convert down to a modeller compatible document. – Nicholas May 13 '11 at 10:21