Stop xjc generating entire include file

I have defined a whole bunch of elements in a schema (m_fields.xsd). Another schema (myclass.xsd) uses an <xsd:include> to include m_fields and points to some of its fields (using ref="m_fields fieldname").
My problem is this : when I use xjc.bat to generate a class out of myclass.xsd it generates objects for ALL the fields defined in the included file m_fields.xsd. Is there a way to stop this happening ?

So that means that if you're generating with JAXB you're more or less limited to "standalone" classes, each with a one on one relationship with a schema.
If I'm right that's a pity; I'm generating data container objects out of schemas for a large organisation and many of the fields I'm using in these classes are common ones.
Is there any other way around this or am I indeed limited to defining a set of types for each data container's schema, with all the repitition that involves? I hope I'm wrong :-)

Similar Messages

  • Xjc generates incomplete .class files

    Hi,
    I want to generate java classes using xml schema with jAXB.
    I have the following xml schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="clinicalDocument" type="ClinicalDocumentType"/>
    <xsd:element name="comment" type="xsd:string"/>
    <xsd:complexType name="ClinicalDocumentType">
    <xsd:sequence>
    <xsd:element name="typeId" type="TypeId"/>
    <xsd:element name="id" type="Id"/>
    <xsd:element name="code" type="Code"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="effectiveTime" type="EffectiveTime"/>
    <xsd:element name="confidentialityCode" type="ConfidentialityCode"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="TypeId">
    <xsd:attribute name="extension" type="xsd:string"/>
    <xsd:attribute name="root" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="Id">
    <xsd:attribute name="value" type="xsd:string"/>
    <xsd:attribute name="root" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="Code">
    <xsd:attribute name="value" type="xsd:string"/>
    <xsd:attribute name="codeSystem" type="xsd:string"/>
    <xsd:attribute name="codeSystemName" type="xsd:string"/>
    <xsd:attribute name="displayName" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="EffectiveTime">
    <xsd:attribute name="value" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="ConfidentialityCode">
    <xsd:attribute name="code" type="xsd:string"/>
    <xsd:attribute name="codeSystem" type="xsd:string"/>
    </xsd:complexType>
    </xsd:schema>
    Upon running xjc the only files generated was:
    ClinicalDocumentType.java
    Code.java
    ConfidentialityCode.java
    EffectiveTime.java
    Id.java
    ObjectFactory.java
    TypeId.java
    Why does ClinicalDocument.java missing?
    Thanks.

    it is generating clinicalDocument.java in my case.

  • How to stop the generating the trace file

    Hi Gurus,
    My client requirement is stop the trace file generation in our database.
    How can I achieve this ?
    what are the impact of the database , if I do the same in our database.
    Thanks,
    Tippu

    Does this database have a four-digit version?
    And which trace file. In some cases you won't be able to stop it, and/or you'd better institute maintenance routines to purge them regularly, or you will loose diagnostic info.
    Sybrand Bakker
    Senior Oracle DBA

  • In SAP-XI stop generating of xml files

    Hi,
    In sap-xi i created a simple file to file scenario. After completion
    of end to end scenario the xml files are keep on generating. I have selected delete option in CommunicationChannel. The xml  file from source folder is deleted. Still the taget xml is generating in Destination folder.
    How to stop the generating of xml files
    Any one tell me the solution for this.
    Thanks,
    Ram

    Hi,
    Do the Following,
    1) Make sure that you deleted all the Files present in Source Directory
    2)Select the Processing mode as Delete.
    3)Now Place the File in the Source DIR path
    4)See Whether the file got deleted from the Source or not.
    5) Check the Sender CC in RWB
    6) Check the SXMB_MONI to get the Success Flag.
    7) Check the Receiver CC in RWB.
    8) Check the Receiver Directory whether received the file or not.
    Please check  these one-by-one
    Regards
    Seshagiri

  • How to stop SQL Server 2008 R2 generating SQLDump.mdmp files constantly?

    Something went wrong with local SQL Server 2008 R2 and it constantly generates SQLDump.mdmp files. It generated 40Gb(!) of SQLDump.mdmp this morning. Server rebooted, but didn't help.
    Any ideas what happened with SQL Server and how to stop SQLDump.mdmp files generation?
    SharePoint 2007 - 2010 Tips & Tricks Portal | Microsoft MVP |
    My Blog about Information Management |
    My twitter

    Memory Dumps are generated automatically by the SQL Server under various circumstances - most of which indicate potential problems in the Instance or the machine. Some that I can recall right now are:
    Database Corruption
    Non-yielding scheduler
    Non-yielding resource monitor
    AV (Access Violation)
    There can be several other reasons as well. SQL Server generates the dumps, so that these dumps can be analyzed to find out potential problems in the SQL Server.
    IMHO, rather than trying to find out ways to stop the dumps from being generated, please try to find out potential problems in the Instance or the machine and fix that. This will stop the dump generation anyway.
    In case you need any assistance in analyzing the Dumps, please feel free to engage Microsoft Support.
    Suhas De
    Please mark solved if your question is completely answered; vote it as helpful to help others find a solution quicker.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/b/suhde

  • Generating a random include file

    I'm trying to generate a random "include" file in an HTML web page. I have a group of 20 files, each with one sentence, and I'd like to randomly call one of those files into my web page, using a statement like
    <!--include virtual = "includes/file1.inc" -->
    Is there a way to use Javascript to generate that line of code, but make the number just before ".inc" be randomly entered?
    Thanks in advance.
    Bob

    Well, dynamically formed file name for include is not possible in javasript. Includes are processed before any javascript runs on the page.
    But
    You can do this if you keep the lines in the HTML file:
    <SCRIPT LANGUAGE="JavaScript">
    lines = new Array;
    lines[1] = "Well, some things in Javascript are not cool";
    lines[2] = "Sometimes Javascript is cool";
    lines[3] = "Ok, I am getting tired of typing now";
    lines[4] = "But then again, who is worried";
    lines[5] = "A random line can be shown";
    var total = 5;
    var randomNumber = Math.random();
    var idx = Math.round( (total-1) * randomNumber) + 1;
    document.write(lines[idx]);
    </SCRIPT>

  • Iphone 3G has stopped playing video entirely. (will not take play videos taken on the iphone no longer play), unable to transfer to computer either. Says Parameter error when I try to copy or play file

    My Iphone 3G has stopped playing video entirely. (will not take play videos taken on the iphone), unable to transfer to computer either. Says Parameter error when I try to copy or play file. very frustrating, not being able to access past videos taken at all. This has been going on for a while now

    Have you done any of the basic troublshooting steps described in the User Guide (Appendix B) - Restart, Reset, Restore?

  • Pro*C/C++ generates error "PCC-S-02015, unable to open include file"

    I'm running a .pc file through the pre-compiler (on Windows 7x64 with instant client 12.1) and get the following error:
    Error at line 78, column 1 in file XXX.pc
    EXEC SQL INCLUDE SQLCA;
    1
    PCC-S-02015, unable to open include file
    If I change the content of my file to the following
    #include "sqlca.h"
    //EXEC SQL INCLUDE SQLCA;
    the pre-compiler does it's job nicely.
    My pcscfg.cfg looks like this:
    include="C:\PROGRA~2\Oracle\INSTAN~1\sdk\include"
    include="C:\PROGRA~2\MICROS~2.0\VC\include"
    define=(WIN32_LEAN_AND_MEAN)
    DEFINE=_WSTDIO_DEFINED
    Has there been a change in the syntax of Pro*C or why can't it resolve the EXEC SQL INCLUDE?
    PS: I'm an absolute newbie to this and am trying to get to compile some veeery old code, build under instant client 9/10/11)

    Karl Esau (guest) wrote:
    : Hi,
    : I have problems to get the precompiler running - executing the
    : precompiler leads to a segfault.
    I meanwhile solved the problem, so that I can compile and
    run the samples.
    a strace on 'proc' showed:
    open("/oracle/precomp/public/SQLCA.H", O_RDONLY) = -1 ENOENT
    (Nosuch file or directory)
    I made a symbolic link for an upper case SQLCA.H, needed to add
    SQLCHECK=SEMANTICS in ~/precomp/admin/pcscfg.cfg and one more
    lib for the make: /lib/libdl.so.2 because 'dlclose' and other
    symbols were undefined.
    bye
    Karl Esau
    null

  • Include files stopped working?

    I had this for an include file on one of my sites:
    <!-- #include file= "../mncis/agencyaccess/default.html"
    -->
    Our server died and we had to move everything to a new
    server. Now I get
    this error:
    "The Include file '../mncis/agencyaccess/default.html' cannot
    contain '..'
    to indicate the parent directory."
    Is there any reason this would have worked on the old server
    but not the new
    server? This is based on ASP and IIS.
    -Darrel

    > <!-- #include file=
    "../mncis/agencyaccess/default.html" -->
    should be this -
    > <!--#include file=
    "../mncis/agencyaccess/default.html" -->
    -------^
    no?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "darrel" <[email protected]> wrote in message
    news:ee4g58$iql$[email protected]..
    >I had this for an include file on one of my sites:
    >
    > <!-- #include file=
    "../mncis/agencyaccess/default.html" -->
    >
    > Our server died and we had to move everything to a new
    server. Now I get
    > this error:
    >
    > "The Include file '../mncis/agencyaccess/default.html'
    cannot contain '..'
    > to indicate the parent directory."
    >
    > Is there any reason this would have worked on the old
    server but not the
    > new server? This is based on ASP and IIS.
    >
    > -Darrel
    >

  • Shifting entire site file structure! (and other issues!!)

    Hi Folks
    I've been working on a totally new look for my site and have pretty much finished it off. in my site file structure within my httpdocs folder I have my current index page and associated files, also within here I have a folder called Beta2 which is home to my new site (within this is the entire new file structure).
    Now I'm ready to launch the 'new' site, but how do I get all the files from the Beta2 file to the main httpdocs folder without buggering all the links up!
    Every time I've tried so far all my includes fail and all the links become defunct.
    I should point out I'm not running a test server all my testing is online so I have a local copy of the file structure and an online copy.
    On a slightly different point (an html one) can anyone work out why including this - <span id="msgbox" style="display:none"> in my form causes it to stop submitting! (it calls up a box displaying if the entered membershipno already exists or not, the function works fine, and the form submits fine, but when you put the two together only the function works, the forms doesn't submit!)
    <p>Membership Number :
        <input name="membershipno" type="text" id="membershipno" maxlength="7" />
        <p>   
        <p><span id="msgbox" style="display:none"></span></p>

    This is partly a shameless bump, but also to say ignore the code issue I just really need to change file structure pretty quickly (by the 11th March!!)
    If anyone can offer an explaination I'd really really appreciate it
    Thanks a lot

  • Time Machine has simply stopped backing up any new files. No items set to be excluded, No error messages.

    I have a Macbook with OS X 10.6.8 and a 500GB external hard drive, which still has 208.5GB available. For some reason, Time Machine has simply stopped backing up any new files (documents, music, movies--anything). No items are set to be excluded from backups in Time Machine options except for the external hard drive itself. Also, no error messages appear, Time Machine seems to run just fine, but when I enter Time Machine, or look through the files on the hard drive, new files just aren't there. I am not very tech savvy, so I was not able to understand some of the answers people gave to similar questions on here. I did go to Pondini's website and followed as many troubleshooting instructions as I could understand (for example I did manage to do a full reset of Time Machine) but nothing changed. Do I just need to erase the entire backup drive and sart all over? If so, what will prevent this from happening again later on? Please help.

    Your TM drive liekly stopped backing up because it hit a series of bad sectors on the drive, to eliminate this all new drives should be Disk Utility > Zero Erased (one step below 7x in Lion) before use.
    Reducing bad sectors effect on hard drives
    Diversify your backups with bootable clones and archives on DVD's etc so your prepared for anything, including using a PC.
    only if you have too of course, but it happens, people just can't afford a Mac anymore.
    Most commonly used backup methods explained
    So make other backups, then Zero Erase teh TM drive and set it back up again and your problem should be resolved.
    If not, then it's data corruption on your boot drive!
    You'll know if it's data corruption on your boot drive, when you go to make the clone, it will hang too.

  • Failure in Precompilation of JSPs  due to include file in WL6.1 SP2

    Hi
              We are getting the following error when we try to do precompilation of JSPs using
              precompile param to true in weblogic.xml
              We are deploying our application as war files.
              eagerly waiting for your help
              sincerely
              Ramesh
              Issue description and StackTrace:
              Issue:
              Precompilation of JSPs fail while using precompile param to true in weblogic.xml and deploy it as War file. It is througing "failure pre-compiling JSP's
              weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              xception: Could not include index.jsp" exception.
              OS: Windows 2000
              Jdk: Sun Jdk1.3.1
              Weblogic: 6.1 SP2
              ***Stacktrace*************
              <Dec 17, 2002 1:05:51 PM CST> <Error> <HTTP> <[WebAppServletContext(3961036,AdvW
              eb,/AdvWeb)] failure pre-compiling JSP's
              weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              xception: Could not include index.jsp
              at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1025)
              at weblogic.servlet.jsp.JspParser.doit(JspParser.java:80)
              at weblogic.servlet.jsp.JspParser.parse(JspParser.java:183)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
              at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255
              

    Ramesh,
              We experienced this sympton as well. In our JSPs, we converted
              <%@ include file="xyz.jsp"%> (static include, source time) to
              <jsp:include page="licensedQuote.jsp"/> (dynamic include, run time)
              and the problem went away.
              We still use static includes at the very start of the JSPs. It seems the problem only occurs when the static include is inside of a tag whose body does JSP evaluation.
              -Charlie
              "Ramesh Danala" <[email protected]> wrote in message news:[email protected]...
              > Hi
              > We are getting the following error when we try to do precompilation of JSPs using
              > precompile param to true in weblogic.xml
              > We are deploying our application as war files.
              > eagerly waiting for your help
              > sincerely
              > Ramesh
              >
              > Issue description and StackTrace:
              > Issue:
              >
              > Precompilation of JSPs fail while using precompile param to true in weblogic.xml and deploy it as War file. It is througing "failure pre-compiling JSP's
              > weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              > xception: Could not include index.jsp" exception.
              >
              > OS: Windows 2000
              > Jdk: Sun Jdk1.3.1
              > Weblogic: 6.1 SP2
              >
              > ***Stacktrace*************
              >
              > <Dec 17, 2002 1:05:51 PM CST> <Error> <HTTP> <[WebAppServletContext(3961036,AdvW
              > eb,/AdvWeb)] failure pre-compiling JSP's
              > weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              > xception: Could not include index.jsp
              > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1025)
              > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:80)
              > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:183)
              > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
              > at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255
              > )
              

  • How to change the filename in @include file?

    I want to do a checking before deciding to include which file,
    for example,
    <%
    if(isValid){
    %>
    <%@ include file="abc.jsp" %>
    <%
    else{ %>
    <%@ include file="def.jsp" %>
    <% } %>but the code above doesnt work in my JSPs
    any idea how to solve this?
    thanks
    Desmond

    Am i clear?? pls correct me if i am wrong..You are wrong.
    The include directive is being used here, which is a compile time include, not a runtime include. Both includes will be performed before the resulting servlet is compiled.
    If they have a conflict between them (either by not nesting them in their own { scope } or using <%! declarations %>) then the generated servlet will fail to compile.
    So if you had the following:
    abc.jsp:
    Hello from ABC!
    <% String myVar = "ABC"; %>def.jsp:
    Hello from DEF!
    <%  String myVar = "DEF";  %>And the page as mentioned in the original post, you would end up with a Servlet something like this:
    if (isValid){
       out.println("Hello from ABC!");
        String myVar = "ABC";
    else{
       out.println("Hello from DEF!");
      String myVar = "DEF";
    }This example would compile because of the presence of the braces.
    However removing the braces or using a <%! declaration %> would probably screw things up with a compile error.
    The %Include directive is like a copy/paste into a JSP before you compile it.
    The <jsp:include> is evaluated at runtime and copies in the result of executing the page.
    The difference is quite subtle, but very important.
    Cheers,
    evnafets

  • My page generates an Excel file but sometimes fails if the page loads to slowly...

    I'm having a problem generating an Excel file using CF and
    looping over a bunch of queries to get a table of data to display
    to the user. This is slow but works fine except for an instance
    recently where the page seems to be loading but after a few minutes
    it stops and says "the page cannot be displayed". The error leads
    me to believe it is a server error and not a CF error but I'm not
    sure. I don't have timeout checked in my CF Admin so that should
    mean that I can request pages for as long as I need to right?
    I'm using the cfheader and cfcontent to dynamically generate
    an Excel spreadsheet from my HTML. I tried using the cfflush tag
    and that seemed to help since it pushes content to the browser
    during the page load but it doesn't work with the cfheader and
    cfcontent tags.
    So then I tried using the cfsavecontent tag and then save the
    HTML to a file but again I couldn't use the cfflush tag inside the
    cfsavecontent tag so now I'm stuck.
    The page DOES load when I run in on my local machine with MX
    6.1 Developer Edition and SQL Server Personal Edition. It DOES NOT
    work when I run it on my production server that then calls my
    separate database server. I'm wondering if there is a timeout (non
    CF) set somewhere on the productions server or the database server
    or if there is some sort of limit to the amount of data you can
    transfer between servers?
    I'm totally stumped now so any advice is greatly
    appreciated!

    That didn't work for me and the page times out right about 5
    minutes (300 seconds). I don't have timeout checked in the CF
    Administrator so I don't think it is CF that is causing the
    timeout. I checked IIS also and the timeout is set to 900 seconds.
    Is there a possibility that SQL Server has some sort of
    connection limit and I'm using too many cfquery tags? If anyone has
    experienced a similar problem I would really appreciate the help,
    thanks.

  • Development environment for 'include' files?

    My photo album program only has a single page. Each time you
    ask for a new page
    it calls itself, with a new set of parameters. Some of the
    more complicated
    pages are generated by setting up a framework (which
    specifies the styles to be
    used, among other things) and then loading an include file
    into it.
    Initially I envisaged these as being simple text files, but
    inevitably some of
    them became quite complex. Developing these in Dreamweaver is
    quite a pain,
    because it doesn't know about the CSS styles. I did try
    making an HTML shell
    file and pasting the include file into it, then cutting and
    pasting it again to
    save the revised version, but this proved to be cumbersome
    and very error-prone.
    Is there any way of telling Dreamweaver to load an
    environment before loading
    the include file?
    Clancy

    > This seems to be about 90% of what I was thinking of,
    but I gather that
    > when you
    > upload the file the hidden stylesheet remains attached
    to the file, but is
    > effectively commented out.
    No. It's only "applied" during Design-time viewing.
    > It is a pity that Dreamweaver doesn't include a
    'compile' option which
    > stripped
    > out template and other Dreamweaver specific commands
    (end_editable and the
    > like)
    > from the development file, leaving clean HTML. If this
    were done it
    > would mean
    > that they could use Dreamweaver specific operations much
    more flexibly,
    > without
    > having to worry about using botched up comment commands
    to hide them from
    > the
    > browser.
    I guess I don't understand what you are referring to here
    with "botched up
    comment commands". A comment is a comment, and really does
    nothing to the
    page at all.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Clancy" <[email protected]> wrote in message
    news:[email protected]...
    > "Murray *ACE*" <[email protected]>
    wrote:
    >
    >>Use Design-time stylesheets.
    >
    > Thanks Murray,
    >
    > This seems to be about 90% of what I was thinking of,
    but I gather that
    > when you
    > upload the file the hidden stylesheet remains attached
    to the file, but is
    > effectively commented out. However I guess that all that
    has to be in the
    > file
    > is an 'include' statement (or perhaps this is what
    actually happens), so
    > it
    > shouldn't lengthen the file noticeably.
    >
    > It is a pity that Dreamweaver doesn't include a
    'compile' option which
    > stripped
    > out template and other Dreamweaver specific commands
    (end_editable and the
    > like)
    > from the development file, leaving clean HTML. If this
    were done it
    > would mean
    > that they could use Dreamweaver specific operations much
    more flexibly,
    > without
    > having to worry about using botched up comment commands
    to hide them from
    > the
    > browser.
    >
    > Clancy

Maybe you are looking for