How to generate .xsd file using jaxb generated java files

Hi,
We need to upgrade our applicatio to jdk1.6 which has jaxb2.0 class files in it. Our application has java files generated from .xsd using jaxb1.0.2 version. At present we dont have .xsd or .xml file with us.
We decide to generate .xsd file by using jaxb1.0.2 generated java files. I tried using schemagen.exe given by jdk1.6 to generate .xsd file. It error out. Is there any other way to generate .xsd file ?
pls let me know.
thanks,
Thiru

Object-XML mapping is a new feature in JAXB 2.0. Classes generated with JAXB 1.0 won't generate a schema.
Generate Java classes with JAXB 2.0 xjc.
http://www.theregister.co.uk/2006/09/22/jaxb2_guide/

Similar Messages

  • Error while loading loading a xml file using a batchxmlloader.java file

    Hi All,
    I am trying to to load the data of an xml to the order management and configurations tables of 11i. While doing this i am using a java program batchxmlloader.java while executing it its giving me the errors as shown below. can anyone help me to remove these errors?
    java.lang.NoClassDefFoundError: javax/jms/JMSException
    at oracle.apps.fnd.wf.bes.ConnectionManager$1.run(ConnectionManager.jav)
    at oracle.apps.fnd.wf.bes.Utilities$1.run(Utilities.java:558)
    at java.lang.Thread.nextThreadNum(Unknown Source)
    Failed to establish Java Business Event System control connection: databaseId =n
    java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnv)
    at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:68)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at java.awt.Toolkit$2.run(Toolkit.java:512)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:503)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1176)
    at java.awt.EventQueue.invokeLater(EventQueue.java:511)
    at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1091)
    at javax.swing.Timer.post(Timer.java:342)
    at javax.swing.TimerQueue.postExpiredTimers(TimerQueue.java, Compiled C)
    at javax.swing.TimerQueue.run(TimerQueue.java, Compiled Code)
    at java.lang.Thread.nextThreadNum(Unknown Source)
    Exception in thread "main" java.lang.UnsatisfiedLinkError: XstartUnsatisfiedRels
    at oracle.apps.cz.logic.Engine.modifyBOM(Engine.java, Compiled Code)
    at oracle.apps.cz.logic.LogicConfig.assertDefaults(LogicConfig.java, Co)
    at oracle.apps.cz.cio.Configuration$UnsatisfiedRulesIterator.<init>(Con)
    at oracle.apps.cz.cio.Configuration.addCompInstancesInOrder(Configurati)
    at oracle.apps.cz.cio.InstanceBase.hasUnsatisfiedRules(InstanceBase.jav)
    at oracle.apps.cz.cio.BomInstance.getSelectableChildren(BomInstance.jav)
    at oracle.apps.cz.cio.Configuration.saveInternal(Configuration.java, Co)
    at oracle.apps.cz.cio.Configuration.createRuntimeTree(Configuration.jav)
    at oracle.apps.cz.cio.xml.CzXmlConfiguration.<init>(CzXmlConfiguration.)
    at oracle.apps.cz.cio.xml.CzXmlLoaderEventListener.processDocumentEleme)
    at oracle.apps.util.dataload.xml.BatchXmlLoaderHandler.endElement(Batch)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingP)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidat)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidating)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java, Compiled Code)
    at oracle.apps.util.dataload.xml.BatchXmlLoader.log(BatchXmlLoader.java)
    at oracle.apps.util.dataload.xml.BatchXmlLoader.<init>(BatchXmlLoader.j)
    at oracle.apps.util.dataload.xml.BatchXmlLoader.initialise(BatchXmlLoad)
    Thanks in well advance.
    Regards,
    Sarang.A.Mehta

    I feel th entry in the property file is wrong....
    it should be name=abc.xml dont enclise in quotes...

  • How to read the attribute of the xml file using jaxb

    Thanks,
    Buddy as i have a issue i have to read the xml file using jaxb and xml file contains this data and i have read the attribute like name , desc and action for a particular menu name pls tell the code how to do this it will be a great favour to me
    thanx in advance
    Rasool
    <contextmenu>
    <menu name='Lead' >
    <menuitem name='newlead' desc='New Lead' action='/leads.do?dispatch=insert' />
    <menuitem name='editlead' desc='Edit Lead' action='' />
    <menuitem name='leadinfo' desc='Lead Information' action='' />
    </menu>
    <menu name='Cases' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    <menu name='Contact' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    </contextmenu>

    What my program do is to get the encoding of XML files and convert them to UTF-8 encoding files, while I need this "encoding" information of the original XML document thus I can convert...
    After reading specifications and JDOM docs, the truth turns to be disappointed, no function is provided to get this information in JDOM level 2(the current released one), while it's promissed that this function will be provided in JDOM level API....
    Thanx all for your help and attention!!!

  • How to handle "xsd:anyAttributes" with jaxb

    Need help for how to handling "xsd:anyAttribute" with jaxb!
    Here is part of my xml schema.
    <xsd:attributeGroup name="DataAttributes">
    <xsd:anyAttribute namespace="##local" processContents="lax"/>
    </xsd:attributeGroup>
    <xsd:element name="Data">
    <xsd:complexType>
         <xsd:attributeGroup ref="DataAttributes"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="MA_Verify">
    <xsd:complexType>
         <xsd:sequence>
         <xsd:element ref="Data" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
         <xsd:attributeGroup ref="verifyAttributes"/>
    </xsd:complexType>
    </xsd:element>
    I have an application which only knows the attribute names and values at runtime. (Thest attributes are string.) Therefore, I cannot define attribute names in the schema and have to use xsd:anyAttribute.
    I was able to generate all jaxb code. However, the interfaces generated for Data and DataType are basically all empty. The impl classes are empty too, since no get or set methods exist for the attribute.
    Some thoughts for handling this case, but do not know if it will work.
    (1) write some derive classes on top of the generated jaxb classes.
    (2) write customized method to handle the 'Data' element level and its attributes. Similar to parseMethod or printMethod for the javaType.
    (if there is a way)
    Can anyone give me suggestions, directions or an laternate way to handle the situation?
    Your help will be greatly appreciated.
    Ruth

    xsd:anyAttribute is not supported by JAXB.
    http://java.sun.com/xml/jaxb/users-guide/jaxb-works.html#unsupported

  • How to Import xsd and use it in transformation for mapping

    I have constructed an xsd and want to use it in BPEL Process.I imported the xsd into development.But I am unable to understand how to further proceed.Can anybody suggest me how to import xsd and use it as it has to be defined in wsdl before using right.Is there any way we can use xsd?

    Hi',
    See in a BPEL (web service) we use XSD to define its input and output, inside this BPEL process you have input and output variable.
    Now inside the transform you can use this variables to transform data, there can be many other variables too, when you try to invoke
    some other BPEL process you again create new input and output variable.
    Inside a transform activity you have a source and a target there you can decide where all the input is coming from you could have
    one or many variables in source and only 1 in target, this is how your variables (or XSD) can go inside the transform, inside the transform.xsl
    view you can right click on the source side(left) and include any new variable there.
    -Yatan

  • Need to transfer files using sftp via java api's.

    Hi,
    I got a requirement to transfer files using sftp via java api's.
    Kindly specify any 3rd party Java Libraray to do this.
    The requirements are
    -It must support extensive encryption algorithms.
    -It must allow generating public/private keys and authenticating with server by sending the keys first(before the actual file transmission).
    Thanks.

    Don't resurrect old threads, please. Start your own thread.
    Better yet: google for "Java SFTP", look at what you find and come back when you have a specific question.
    And: when you ask a specific question, then clarify if you're talking about the [SSH file transfer protocol|http://en.wikipedia.org/wiki/SSH_file_transfer_protocol] or about FTPS, which is sometimes (wrongly) called SFTP.

  • Read an avi file using "Read from binary file" vi

    My question is how to read an avi file using "Read from binary file" vi .
    My objective is to create a series of small avi files by using IMAQ AVI write frame with mpeg-4 codec of 2 second long (so 40 frames in each file with 20 fps ) and then send them one by one so as to create a stream of video. The image are grabbed from USB camera. If I read those frames using IMAQ AVI read frame then compression advantage would be lost so I want to read the whole file itself.
    I read the avi file using "Read from binary file" with unsigned 8 bit data format and then sent to remote end and save it and then display it, however it didnt work. I later found that if I read an image file using "Read from binary file" with unsigned 8 bit data format and save it in local computer itself , the format would be changed and it would be unrecognizable. Am I doing wrong by reading the file in unsined 8 bit integer format or should I have used any other data types.
    I am using Labview 8.5 and Labview vision development module and vision acquisition module 8.5
    Your help would be highly appreciated.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    read avi file in other data format.JPG ‏26 KB

    Hello,
    Check out the (full) help message for "write to binary file"
    The "prepend array or string size" input defaults to true, so in your example the data written to the file will have array size information added at the beginning and your output file will be (four bytes) longer than your input file. Wire a False constant to "prepend array or string size" to prevent this happening.
    Rod.
    Message Edited by Rod on 10-14-2008 02:43 PM

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

  • How to view the change immediately after a java file is modified without restarting server or redeploy?

              Hi All,
              How to view the change immediately after a java file that is used in jsp is modified
              without restarting server or redeploy?
              Moreover, it is better to keep the original session.
              Any suggestion is appreciated.
              Kammau
              

              Hi,
              In order to have a new version of a java class, the current classloader must be
              deleted and a new one created. This is what redeployment does. I believe that
              this is more of an issue with Sun's implementation of classloaders. You could
              ask BEA support (719.232.7878) and see if they have any plans to periodically
              check jar files to see if java class file timestamps and destroy and re-create
              classloaders on the fly.
              1) You will still have to accept the performance hit of destroying classloaders
              and creating new ones. There isn't any way around that.
              2) I would think you would want to have more explicit control in production and
              integration anyway.
              You can redeploy applications from the command line (script) file not just the
              console.
              Hope this helps,
              pat
              "Kammau" <[email protected]> wrote:
              >
              >Hi All,
              >How to view the change immediately after a java file that is used in
              >jsp is modified
              >without restarting server or redeploy?
              >Moreover, it is better to keep the original session.
              >Any suggestion is appreciated.
              >
              >Kammau
              

  • File Visibility in uploading the file using web DynPro java

    hello,
    i have gone through the tutorial " uploading & downloading the file using web DynPro java".
    the upload functionalty is working fine. but i need to know thw path where these files are getting uploaded ??
    Waiting for the reply..
    Regards,
    Viren Gupta

    Hi Viren,
    Are you are refering to the below tutorial for upload and download:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f?QuickLink=index&overridelayout=true
    If yes, then answer is that the file is stored in the context of the application only as "com.sap.ide.webdynpro.uielement-definitions.Resource" object. Please read through the tutorial to understand the full process.
    WD doesn't really upload to server automatically unless there is any explicit code written. All it does is to store the file in a temp context which you can access and write your own code to store it in a particular location.
    Regards,
    Mahesh

  • Add a header/footer in MsWord(.doc) file using POI in java

    hi experts,
    I want to add a footer/header in the existing MsWord(.doc) file using POI in java without changing its original format.
    can anybody help me?
    Thanx.

    What you describe tends to indicate that you're using Reader, not Acrobat. If you do have Acrobat installed, make sure you're using it and not Reader.

  • How to make a "Program" out of my .java files?

    I have made a little application that stores a file to disk. Is there someway to make a file out of my .java files so it can be run without opening my editor and choosing run?

    sorry I didn't check that, I can now run the jar command.
    But even though I can create a .jar file I get an error. I have followed the guide that says I need to add the applications Entry point.
    I have two classes:
    saveDates.class //contains the main method
    UserInput.claa // Parsing of user input
    When I create the jar file I type:
    jar cfe saveDates.jar SaveDates SaveDates.class UserInput.class
    But when I try to run it like:
    java -jar saveDates.jar
    I get the error:
    C:\workspace\dato>java -jar saveDates.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: SaveDates$1
    at SaveDates.main(SaveDates.java:89)
    C:\workspace\dato>
    Do I need to change the main method someway?

  • How to use JAXB generated classes with SOAP

    hello,
    I have a library of JAXB generated classes for my web service. There is a Java class for each web method defined in my schema. For example, my getLocation method is mapped to GetLocation.class.
    However my web service is SOAP based, so I am having to manually strip off the SOAP elements to be able to unmarshall the getLocation xml to a GetLocation class.
    I am noticing a disconnect between JAXB and other Java SOAP and RPC libraries. Does anyone know how to create a JAXB class for SOAP Envelopes and Bodys? Does anyone have any ideas how to incorporate the existing Java web service libraries with JAXB?
    Thanks in advance.

    Have you found a method to integrate SAAJ and JAXB? Or
    is better to use SAAJ only ?If I had to choose I'd go with SAAJ. It seems to me that's theoretically possible to use JAXB classes with SAAJ but I imagine if it is possible it would be a big pain in the ass.

  • Help: Creating web service proxy using JAXB generated domains

    Hi,
    I'm currently doing some investigation considering the use of web services (BPEL) as a complete application backend.
    The application should contain a pojo facade which communicates with some web service proxies. By making a datacontrol
    of the pojo facade, I'm able to expose methods to the client layer.
    I generated my domain objects by using the JAXB Compilation option in JDeveloper. By using that, a java class can be generated
    based on an XSD. Disadvantage of this use, seems to be the fact that the ObjectFactory class, generated by JAXB, is overwritten
    each time I create java classes from an XSD.
    Q1: Is there a solution to prevent the ObjectFactory class to be overwritten? I also could decide not to use it.
    After the domain objects are created, I want to call the actual webservice and receive the response by using the JAXB marshaller
    and unmarshaller. Problem here is:
    Q2: How do I (manually?) create a proxy which calls the web service, by using the domain objects generated by JAXB?
    Q3: An important requirement is that it needs to be simple to switch from several environments (eg from development to test). How
    can I fulfill this requirement in a nice, solid solution?
    Any tips working with web services as the backend layer are welcome!
    JDeveloper 10.1.3.4
    ADF Faces/JSF
    BPEL
    Thanks,
    Koen Verhulst

    repost.

Maybe you are looking for