Generate XML Schema from Java classes?

Hi,
Considering an XML Mapping, i would like to generate a default XML Schema from my Java class.
Is there a tool in toplink (10.1.3) to do that or does anyone have an easy way to generate this XML schema?
Thanks,
Ludovic

Hi Ludovic,
We don't have support for schema generation from Java classes in TopLink 10.1.3. It's required for JAXB 2.0 so it will be available in a future release.
--Shaun                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Generating database tables from Java classes

    Hi,
    I've encountered a number of tools which will create Java classes from database tables (e.g. JDeveloper has this functionality, Abator provides this for iBATIS, etc...).
    However, I've not been able to locate any tools that perform the opposite job - i.e. given a Java class, it generates a database table (or, presumably, some SQL).
    It's been suggested to me that Hibernate might provide this sort of capability, but if anybody has any experience of doing this, in any tool, I'd be interested to hear about it.
    Thanks,
    Alistair.

    Many thanks for the pointers.
    duffymo: I've taken a look at Middlegen (http://boss.bekk.no/boss/middlegen/index.html) but it seems that the first step is to specify the database schema, whereas I'm looking to generate the schema from existing code. Or have I missed something?
    Alistair.

  • Can you generate XML schema from XMLDB?

    I have not used XMLDB and don´t read the entire doc about the product(sorry for that).
    I got the following question, is it possible to generate a XML schema from relational data through XMLDB? Or is this best done via a third party software like XMLSpy or alike?

    3rd Party Software...
    We can generate a schema for an object Hierarchy but our considered opinion is that there is no sensible way to generate an XML Schema representation of a purely relational data structure. It requires a tool which allows you to make decisions on how to organize the heirarchy.

  • Generate XML Schema from oracle tables

    I am new to xml...We have a requirement to generate xml schemas for one or more oracle tables...Are there any tools availaible in oracle?.....I have tried xml spy which generates the schema but i want it like a batch process probably without user intervention...

    An XML document may be generated from a database table with XSU.
    http://www.devx.com/xml/Article/32046

  • Generate XML Schema from Oracle Database

    Is there a utility that would allow our team to generate XML Schemas directly from existing Oracle databases? Or do you have a suggestion on how to achieve this?
    Thank you.

    Hey, The Schema Processor is available in the Technologies section on this site. Just download it and see the samples. You will get the way for doing it. If you are having problems then just call me.
    Bye.
    null

  • How to Generate XML File from Java Code.

    I want to generate the xml file from the java code.
    Could you plz suggest any webSite address with example?

    Here is the code
    import java.io.File;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class CreateXML {
         private DocumentBuilderFactory factory = null;
         private DocumentBuilder builder = null;
         private Document document = null;
         public CreateXML() {
              try {
                   factory = DocumentBuilderFactory.newInstance();
                   builder = factory.newDocumentBuilder();
                   document = builder.newDocument();
              } catch (FactoryConfigurationError e) {
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
         /** Creates the document for xml. */
         public Document createDocument(){
              try{               
                   Element root = document.createElement("Root");
                   Element child = document.createElement("child");
                   root.appendChild(child);
                   document.appendChild(root);
              }catch(RuntimeException e){
                   e.printStackTrace();
              return document;
         /** Saves the document as xml. */
         public void saveDocument(Document document){
              try{
                   TransformerFactory transFactory = TransformerFactory.newInstance();
                   Transformer transformer = transFactory.newTransformer();
                   DOMSource source = new DOMSource(document);
                   StreamResult stream = new StreamResult(new File("sample.xml"));
                   transformer.transform(source, stream);
                   System.out.println("XML Created !!");
              }catch(TransformerConfigurationException e){
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
         public static void main(String args[]){
              CreateXML createXML = new CreateXML();
              Document document = createXML.createDocument();
              createXML.saveDocument(document);
    }

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • Generate XML Schema

    Can I generate XML schema from a existing xml file?

    Hi,
    i have tried the stylus studio to generate XSD from XML but it does not generate all the tags for e.g the maxlength. is there any way to generate a XSD from an XML query

  • Java code to generate XML File from XML Schema

    Hi I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...

    JAXB has been available as an early release download for some time. There are also XML Binding packages available from Borland (JBuilder) and Castor. These tools create Java classes from a source document, xml,dtd etc. You can use these classes to marshal-unmarshal XML documents.
    Dave

  • Hi I need this asap... "Java code to generate XML File from XML Schema"

    Hi all....
    I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...
    PS: I already posted in the afternoon... this is the second posting.

    take look at :
    http://sourceforge.net/projects/jaxme/
    this might help...

  • Generate XML instance from a given XSD schema

    Is there an Oracle XDK Java API, which given an XSD as input, will
    generate a sample XML instance corresponding to that XSD.
    XMLSpy Tool can do this.
    I know JAXB can be used to generate Java Classes, which can then be used programmatically to generate XML Instances.
    I am looking for a solution other than JAXB where Java classes does not need to be generated.

    In JDeveloper an XML document instance may be generated from an XML Schema.
    Select File>New>General>XML. Select XML Document from XML Schema in Items listed. Click on OK button. The Create XML Document from XML Schema wizard gets started. Click on Next button. In File Location frame, specify XML file name. Select Use Registered Schemas, to create an XML document from a registered schema. Click on Next button. In Options frame, select Root Element and click on Next button. In the Finish frame, click on Finish button. An XML document instance gets added. The XML document has all of the elements defined in the XML Schema from which the XML document is instantiated.

  • Generate XSD from java class

    Hi all,
    Is there any tool that can generate an XSD from either a java code file or a byte code file?
    Thanks in advance,
    Asaf

    I've never used it, but the Castor project also provides such a tool...at least that what it says in its FAQ:
    http://www.castor.org/xml-faq.html#Is-there-a-way-to-automatically-create-an-XML-Schema-from-an-XML-instance?

  • Create xml from xml schema in java

    If can i create a xml document framework from xml schema in java, then i can fill the value in java?
    thanks

    An XML document may be created from an XML Schema with JAXB.

  • Creating xml schema from database attributes

    Hi,
    I am trying to generate dynamic xml schemas from a java program.
    Please suggest me some solutions.
    The scenario is like this.
    The input to the java program is a table[oracle] name
    and based on that table's column headers, i need to define and
    create the xml schema dynamically.
    The purpose is that at a later point of time, i may
    need to copy the content of the database to xml files.
    Please reply with your suggestions.
    Thanks in advance,
    Dilip

    XML Schema itself is a well formed XML document. You can write a small utility class which can do this for you by using any XML API available in Java.
    Thanks,
    Tejas

  • Web Service From Java class, serialization problem

    Hi,
    I want to create Web Service from Java class, I made java project, generated web service from it, create web service archive project and deployed it to WAS 6.40.
    My class have 2 methods,
    public int add(int a, int b);
    public MyResponse doSomthing(MyRequest req);
    I can succesfully call add method from Web Service Navigator, it works fine but when I call doSomthing methods I get the following error:
    <b>
    Deserializing fails. Nested message: XML Deserialization Error. Result class [com.mycomp.sap_tech.ws.MyRequest] does not have property [Amount] of type [java.lang.String]. It is required to load XML..
    </b>
    Any ideas how to resolve it?
    P.S. MyRequest class is exposed throw VI, has default constractor and public getters and setters for all properties. It implements Serializable as well. Any guesses?
    Thanks in advance,
    Victor.

    Hi Bhavik, thanks for response.
    as I already mentioned it implements Serializable, so it is not the problem.
    Thanks Avi but it didn't helps iether
    Victor

Maybe you are looking for

  • My enter button and web search orb won't work only on my homepage. Works everywhere but there. We have Yahoo for a homepage. What should I do?

    We have the at&t/yahoo homepage fixed where we can check our other email account. On this page, I have just a color theme and all of the news items disabled. We have had this for three years now. Just a few days ago we noticed that when we use the se

  • Picture Cut-off

    Hi All, I have recently updtaed to 3.0.1, and my TV shows are now not playing correctly. When I play them, the top and bottome of the picture is cut-off. It may be that the sides are cut-off as well, I just cannot tell. I have tried to adjust my TV s

  • IPad Mini "No Sim" Message

    Greetings everybody, I have an iPad mini on Verizon.  It's worked like a champ for the first few weeks.  All of a sudden, I started getting the "No Sim" message.  I've tried all the usual stuff - rebooted it, reset network settings, hard reset, etc..

  • Windows 8 Pro on a Touchsmart IQ510uk.

    Anyone installed Windows 8 Pro on a touchsmart IQ510uk ? I keep on getting a blank screen. 

  • Linux equivalent of pkginfo -i

    I need to determine what Linux packages are associated to a particular software application so I can uninstall them. Is there a Linux equivalent to Solaris' pkginfo -i command? I've already tried different variations of the Linux rpm command but, no