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.

Similar Messages

  • 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 :-)

  • Do java programms after giving compilation error generates .class file?

    Do java programms after giving compilation error generates the .class file?
    Do any outer class may have the private as access modifier?
    If someone asks you that -do any program in java after giving a compilation error gives the .class file -do any class except(inner class)
    be defined as private or static or protected or abc or xxx Now type the
    following program
    private class test
    public static void main(String s[])
    System.out.println("Hello!How are You!!");
    -Compile it.... You must have
    received this error test.java:1:The type type can't be private. Package members are always accessible within the current package. private class
    test ^ 1 error
    Here please notify that compiler has given the
    error not the warning therfore .class file should not be created but now type
    >dir *.class
    ___________ and you will see that the
    test.class file existing in the directory nevertheless this .class file
    is executable. if you will type __________________ >java test
    it will
    wish you Hello! and suerly asks you that How are You!! ________________!
    You can test it with the following as acces modifiers and the progrm will run Ofcourse it will give you compilation error.
    protected
    xxx
    abc
    xyz
    private
    Do you have any justification?

    Hmm,
    I've been working with different versions of jdk since, if I'm not mistaken, jdk1.0.6 and never was able to get *.class with compilation errors. It was true for Windows*, Linux, and Solaris*.
    About the 'private'/'protected' modifier for the type (class) - it makes perfect sence not to allow it there: why would anyone want to create a type if no one can access it? There should be a reason for restricting your types - let's say, any inner class can be private/protected.
    For ex., you shouldn't have compile problems with this:
    class Test
    public static void main(String s[])
    System.out.println("Hello!How are You!!");
    private class ToTest{}
    Sorry, but I don't really know where you can read up on that.

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • Class files problem

    Hi All,
    I am getting a problem in Eclipse.
    Suddenly i am not able to generate the class files in the Eclipse.
    I have checked my build path,removed the jar files and then
    again added.
    But still i am not able to generate the class files.
    Please help

    yes i have unchecked the build
    automatically..........
    i normally right click on the nabigator view and
    then
    click bulid project......please help on what i am
    missingAnd that's suddenly stopped working? How do you know?

  • .Class file comparison

    Is there a tool that can compare two .class files, and/or generate output as to there identities and differences? For example, I compile the same java source file twice, with or without any source changes, generating two .class files. Is there a tool that can tell me the contents of each .class file, and/or compare the contents of each .class file? Thank you in advance for any information on this subject.

    >
    i think he/she means something more high-level than
    file compare..
    like reverse coding the .class file or something. i
    don't know if anything like that exists though..If that's the case JAVAP (Java class file disassembler) might be useful: http://java.sun.com/j2se/1.4/docs/tooldocs/windows/javap.html

  • MyClass$1.class files when I compile

    When I compile as follows
    javac myclass.java
    the following files get created
    myclass$1.class
    myclass$2.class
    myclass.class
    why am i getting the first two .class files?
    i'm running jdk 1.3.1 and i also have Forte CE 3.0 installed.
    this never used to happen.
    does it have something to do with Forte??
    Any help please

    Your source code includes an annonymous inner class - something like
    new WindowAdapter() {
    The compiler generates this .class file for this 'class' with no name. Search the forum for "$1.class" for more/better explanation. Here's one thread.
    http://forum.java.sun.com/thread.jsp?forum=7&thread=13504

  • IMessage interface Comp Controller (JAVA file) generated incompletely

    Hi Experts,
    I am doing a web dynpro java component, it has two views A & B (Comp view)
    I have rebuild the DC but not yet deployed it so no class files yet
    When i checked on the java code of my component controller it implements the IMessage interface, the corresponding package is imported, yet i can not call any values saying "<VALUE> can not be resolved"
    when i checked on the /wdp folder the java file for the IMessage<CompControllerName> does not contain the values, which explains the case above saying value can not be resolved.
    My question is why was this java file generated incompletely (without the values)?
    As i understand this java file is automatically generated by the WD code generator.
    Do i need to define the values manually in the file (by editing it),  or do i specify it graphically?
    Below SHOULD be the complete code generated::
    // This file has been generated by the Web Dynpro Code Generator
    // DON'T MODIFY!!! CHANGES WILL BE LOST WHENEVER THE FILE GETS GENERATED AGAIN
    // $JL-GENERATED-SOURCE$
    package com.ides.soa.cmp.ssc.ui.goodsmovementcomp.wdp;
    * This interface encapsulates all texts / messages for this component.
    * The message constants of type IWDMessage can be used in
    * conjunction with the IWDMessageManager.reportMessage method.
    * All constants can be used in conjunction with IWDTextAccessor.
    @SuppressWarnings("all")
    public interface IMessageGoodsMovementComp {
       * ErrorMessage <code>"Enter a valid {0} to proceed."</code> using
       * key "INVALID_INPUT".
      public static final com.sap.tc.webdynpro.progmodel.api.IWDMessage INVALID__INPUT = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIMessage( com.ides.soa.cmp.ssc.ui.goodsmovementcomp.GoodsMovementComp.class, "INVALID_INPUT", com.sap.tc.webdynpro.services.message.WDMessageType.ERROR );
       * ErrorMessage <code>"Invalid input for goods movement"</code> using
       * key "MISSING_GOODS_INPUT".
      public static final com.sap.tc.webdynpro.progmodel.api.IWDMessage MISSING__GOODS__INPUT = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIMessage( com.ides.soa.cmp.ssc.ui.goodsmovementcomp.GoodsMovementComp.class, "MISSING_GOODS_INPUT", com.sap.tc.webdynpro.services.message.WDMessageType.ERROR );
       * ErrorMessage <code>"The response from the service {0} is null"</code> using
       * key "NULL_RESPONSE".
      public static final com.sap.tc.webdynpro.progmodel.api.IWDMessage NULL__RESPONSE = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIMessage( com.ides.soa.cmp.ssc.ui.goodsmovementcomp.GoodsMovementComp.class, "NULL_RESPONSE", com.sap.tc.webdynpro.services.message.WDMessageType.ERROR );
    I am trying to consume a webservice in wd java
    Thanks in advance

    What you will do in your controller is get a reference to the AM via the pageContext object.
    Like this:
    OAApplicationModule am=(OAApplicationModule)pageContext.getRootApplicationModule();
    Use the am ref to call methods in the am.
    Kristofer Cruz

  • How to set a 'package' for the xjc generated files?

    Hi!
    What can be done the let the 'xjc' source generator
    create a 'package' line for each generated java file?
    Karl

    Can I generate the classes from the same xjs file to different packages ?
    For example:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <xml-java-binding-schema version="1.0-ea">
         <options package="try.billing.data"/>
         <element name="downloadUnbilledCallsContent" type="class" root="true">
              <content>
                   <element-ref name="accountId"/>
                   <element-ref name="email"/>
              </content>
              <attribute name="dataObject"/>
              <attribute name="handlerClass"/>
         </element>
         <options package="try.util.data"/>
         <interface     name="JavaSources"
                   members="DownloadUnbilledCallsContent"
                   properties="dataObject email"/>
    </xml-java-binding-schema>
    The interface JavaSources has to be in try.util.data package but the downloadUnbilledCallsContent class has to be in try.billing.data.
    thanks

  • At the time of generating .class files i got below warning.

    Hi all,
    i develop one oaf page and move to server and generate .class files.
    at the time of generate .class files i got below error.
    plz help me.
    *[appldev@wnsfinapp webui]$ javac AgingBucketsCO.java -deprecation*
    AgingBucketsCO.java:114: warning: setRedirectURL(java.lang.String) in oracle.apps.fnd.framework.webui.OAPageContext has been deprecated
    pageContext.setRedirectURL(
    *^*
    *1 warning*
    Thanks
    Seshu
    Edited by: its urgent on Jan 30, 2012 4:47 AM

    Hi Pratap,
    thanks for your replay,
    i register the page in apps its working fine.
    but my page having go button.normally whenever goto the GO button it display hyperlink.
    in my local machine displays hyperlink.after move to server it displays cursor.
    Plz help me
    Thanks
    Seshu.

  • Getting generated class files using the compiler api??

    I am writing a compiler/IDE for java, and i use the new JavaCompiler API
    (javax.tools.JavaCompiler)
    i want to ask, is it possible to get the generated class file(compiled file) names??
    can anyone help me with this, read at the documentation and i have no idea which one is used to do such thing..
    Or is it impossible??
    Thanks, please guide me on this..

    E.D.-inc wrote:
    I am writing a compiler/IDE for java, and i use the new JavaCompiler API
    don't.
    i want to ask, is it possible to get the generated class file(compiled file) names??
    yes, probably (after all, other tools can do it). Don't ask me how though, I've never had a need to.
    can anyone help me with this, read at the documentation and i have no idea which one is used to do such thing..
    no. Someone else reading the documentation for you won't help you any. Read it yourself, you might learn something.

  • What are "Name$1.class" files and how do I generate them in Eclipse

    I have the source code of a rather large java application and I want to set up an Eclipse project for it.
    After diffing the WEB-INF directory generated by Eclipse with the one generated by the original maven build script I noticed that there are several files of the form "Name$1.class" which do not exist in the Eclipse output.
    My questions are, what is the purpose of this $1 string in the class file name and how do I generate those in Eclipse?

    ok, but why are they generated in the Maven environment but not in the Eclipse environment?
    To be exact, Eclipse does create inner class files, however when diffing both output directories I have some extra inner class files generated by Maven that are not there in the Eclipse output.
    Maybe there are some java compiler settings for this?

  • VM crashes with big class files generated of JSPs

              Hi,
              When calling certain JSP pages with WebLogic Server 5.1 (SP 6) the HotSpot Virtual Machine (JDK1.3) crashes with a core dump.
              Using WebLogic as the JSP engine produces of every JSP page one java file which
              is compiled with javac to one class file. Each generated java file consists of
              just one method: _jspService(...){...}. One method is allowed to be of 64 K
              (the dynamic part 32 K as maximum). As we include other JSP pages and
              components and use taglibraries, the WebLogic JSP engine generates a very big
              java file (more than 1 MB). Javac compiles this to a class file which only
              method exceeds the 64 K limit. As the javac compiler does not reject the class
              file with the to big method the virtual machine crashes.
              Running the same JSP page on Windows NT 4 with WebLogic Server 5.1 (Service Pack 6)
              and JDK 1.3 BUT using the java option -classic works.
              Unfortunately it seems that there is no -classic option for java on Solaris for JDK1.3.
              Using JDK1.2 (JDK_1.2.2_05a) on Solaris or the jikes compiler of Jakarta
              causes an exception instead of a core dump but still does not work.
              Using solaris jdk1.2.2_05a the same page request results in the following exception:
              Tue Nov 21 09:08:16 CET 2000:<I> <WebAppServletContext-maxblue> Generated java file:
              /opt/tadevw/maxblue/weblogic/maxblue_cluster/maxblue_server/public_html/WEB-INF/_tmp_war/jsp_servlet/_portfolio/_PortfolioMyportfolio.java
              Tue Nov 21 09:08:24 CET 2000:<E> <WebAppServletContext-maxblue> Servlet failed with Exception
              java.lang.VerifyError: (class: jsp_servlet/_portfolio/_PortfolioMyportfolio, method:
              _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch
              Is there a way that the JSP engine of WebLogic creates/generates
              more than one function? (Without reengineering of the source code?)
              Regards,
              Boris
              

    Thank you! I had no idea. But what is a FAT32 drive? Is it the work bench in the Mac, that is used for the transfering between the external hard drives? Is there any way around this then?
    I thought in these HD home movie days, that this was an easy thing dealt with everyday. I still need to understand what practical solutions I can find. The files are .mov - quicktime files.
    It couldn't be the case that files larger than 4BG should be locked in the hard drive forever?
    Sverre

  • JNI generated header file does not match the class file

    We have had a JNI project for many years and all has been fine. Within our libraries we have several classes that have inner enum classes.
    Recently we have moved to JDK1.7. Up to now when JNI generated the methods where the signature used the inner enum class, and it was an oveloaded method, we would get something like the following as the signature:
    Java_PackageName_ClassName_methodName_OuterClass_00024InnerEnum_2
    And the class file result of the build would look like the following:
    methodName(OuterClass$InnerEnum)
    Since we have moved to JDK 1.7 the header file looks like the following:
    Java_PackageName_ClassName_methodName_OuterClasss_InnerEnum_2
    The class file is still the same, and because of that when we run the program we get an UnsatisfiedLinkError. I understand that this error is because the VM cannot find the implementation. So why JDK 1.7 generates a header file that does not match the class file?
    Thank you in advance.

    I don't have 1.6 to verify but your statements about what is generated for 1.7 for the header appear correct.
    The 000024 represents the '$' and for 1.7 the inner class is still named using '$'. So for example after compiling in 1.7 the inner class file is named the following...
    MyClass$InnerEnum.class
    So a one to one conversion should have kept the 000024 (presuming it does in fact do it that way in 1.6.)
    You might want to look at the release notes for 1.7.
    If you need a solution you could add a post javah step that renames the file.

  • Can i generate java API from class files

    I have only class files. Is it possible to generate the java API using the javadoc.If yes, pls tell me how can i do??

    Also, Javadoc 1.4.2 will contain an unsupported option -Xclasses
    that should allow you to do this. You must pass in class names
    and use -classpath to find them. For com.package.MyClass
    at /home/classes/com/package/MyClass.class,
    you would run:
    javadoc -Xclasses -classpath /home/classes com.package.MyClass
    For mroe info, see:
    http://developer.java.sun.com/developer/bugParade/bugs/4720100.html-
    Doug Kramer
    Javadoc team

Maybe you are looking for

  • My App Store does not work, please help

    When I click on the app I would like to purchase or download On the App Store it does not give me the option to actually download it, I'm not great with macs any answer Is aprreciated

  • PI message ID in mapping field

    Hi experts, We have a requirement of generating a Uique number in ECC....since in PI, we have message id for every incoimg message which is UNIQUE , we need to pass the same messsage ID as a filed value in PI and map to one of the ECC field ...is it

  • Screen size shortenedfrom top to bottom

    Attempt to increase font size on iMac via--System Preferences --Display and tried out different dimensions. None satisfactory. When tried to settle back on original 1280 by 1024, Firefox occupies the width but not the length of the screen .It is ampu

  • Does anyone know where can I get a replacement UK power supply for the Photosmart B110 series?

    the HP website is mighty confusing and I'm having no joy! Thanks Jeff This question was solved. View Solution.

  • Having a hard time with group by

    Ok here is my table structure: $query = 'CREATE TABLE '.$this->table_name.' ( '; $query .= 'id number(10) NOT NULL,'; $query .= 'user_id number(6) NOT NULL,'; $query .= 'module_name varchar2(36) NOT NULL,'; $query .= 'link varchar2(150) NOT NULL,'; $