On 9/14/05, Kr <[EMAIL PROTECTED]> wrote: > Hi, > > Are there any tools out there that can convert my java class to xml schema. > How such tools take care of java collections like HashTable, ArrayList > etc. in my class structure. I am not interested in writing any > configuration files(like jaxb configuration files, jibx binding xml > files etc.) for serving this purpose and the can be able to give me > xml schema from the java classes. Please suggest ... > > I am not sure even JAXB 2.0 allows me to do this without writing any > jaxb configuration files or annotations in my java class which is not > there in JDK 1.4.2
the start-from-java approach (to xml-object mapping) maps java classes to xml. many start java tools can create xml schemas which describe the resultant xml. there are a number of tools that will do this with minimal configuration. however, to get good schema customization of the mapping is usually required. (if you're happy with mapping fields then take look at http://jibx.sourceforge.net/. http://jakarta.apache.org/commons/betwixt/ is a bean based approach but is also a dynamic mapper (which means that it is slow) with experimental schema support.) we were talking about this problem on this list a while ago. the consensus is that one missing feature is a good gui tool which would assist this process and generate the detailed mappings used by the engine. might not be much use for you ATM but if you're interested in the start-from-java problem i posted some doodlings based on the discussions here: http://people.apache.org/~rdonkin/tool/mapping1.html http://people.apache.org/~rdonkin/tool/tune.html http://people.apache.org/~rdonkin/tool.html - robert