JAXB binding schema problem

hi friends,
i didn't get implementation classes for xsd during the binding schema.i insatlled Jwsdp2.0and j2sdk1.5.Is any give me me an idea

Hi
Go through the sun website for doing so. This would give you a clue as to how to.
http://java.sun.com/xml/jaxb/jaxb-docs.pdf
It teaches you a step by step procedure to go ahead.

Similar Messages

  • JAXB binding schema type conversions

    If your DTD contains something like this:
    <!ELEMENT chicken (egg+)>
    then JAXB gives you a Chicken class with a method that returns a List of Egg objects.
    How can I specify in the binding schema that this collection should be a Hashtable (or other type of collection), not the default List? I think I probably have to write some sort of conversion class, but what is the syntax and how do I get it into my binding schema?

    Hi you can use the <option> tag at the top-level of your binding schema definition. You can define the default collection type of to be used e.g.
    <options default-reference-collection-type="array"/>
    Or you can use the collection attribute of most element bindings e.g.
    <choice property="entries" collection="array"/>
    But only arrays and lists are supported. If you want a different collection type, then you will have to subclass the generated classes and use the Collections class and the collection classes to convert between different collection types.
    Hope this helps.

  • JAXB -Binding Schema

    What entries should you make in the binding schema for:
    <rate year="2001">7.00</rate>
    so that it constructs a class rate with a field "content" as a double and a field year as an int?

    same questions:
    in DTD defines
    <!ELEMENT SERVICETYPE     (#PCDATA)>
    <!ATTLIST SERVICETYPE     
         type           CDATA #REQUIRED
         anon           CDATA #REQUIRED>
    how should I define the element SERVICETYPE in my binding Schema?
    Gang

  • JAXB - xml schema problems

    Hi, I'm having problems constructing a correct schema for my XML input. I already have this XML:
    <resultSet>
    <row id="1">
      <col name="ID">1</col>
      <col name="parentID">0</col>
      <col name="categoryName">Brands</col>
    </row>
    <row id="2">
      <col name="ID">2</col>
      <col name="parentID">0</col>
      <col name="categoryName">Laerdal</col>
    </row>
    (...) etc. for 244 rows
    </resultSet>I've looked at the examples to try to figgure out how the schema (XSD) should look like, but I keep getting rumtime exceptions. Here's my XSD so far:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="resultSet" type="CategoryType"/>
    <xsd:complexType name="CategoryType">
         <xsd:sequence>
         <xsd:element name="row" type="CategoryRow"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CategoryRow">
         <xsd:sequence>
              <xsd:element name="col" type="CategoryCol"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CategoryCol">
         <xsd:sequence>
              <xsd:element name="ID" type="xsd:int"/>
              <xsd:element name="parentID" type="xsd:int"/>
              <xsd:element name="categoryName" type="xsd:string"/>
         </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>I can't find any examples on converting XML to a schema that would define it.
    Help anyone??
    by the way, this is the runtime exception I get:
    DefaultValidationEventHandler: [ERROR]: Unexpected end of element {}:col
    javax.xml.bind.UnmarshalException: Unexpected end of element {}:col
         at com.sun.xml.bind.unmarshaller.UnreportedException.createUnmarshalException(UnreportedException.java:59)
         at com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.reportAndThrow(SAXUnmarshallerHandlerImpl.java:406)
         at com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.endElement(SAXUnmarshallerHandlerImpl.java:108)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
         at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:139)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:129)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:134)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:138)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:151)
         at no.xait.dod.communication.dataAccess.sendXML(dataAccess.java:121)
         at no.xait.dod.designondemand.<init>(designondemand.java:87)
         at no.xait.dod.designondemand.main(designondemand.java:602)
    Process terminated with exit code 0

    Modified schema:
    <xsd:element name="resultSet">
    <xsd:complexType>
    <xsd:sequence>     
    <xsd:element ref="row" minOccurs="0" maxOccurs="unbounded"//>     
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="row">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="col" minOccurs="0" maxOccurs="unbounded"//>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="col">
    <xsd:complexType>
    <xsd:sequence>          
    <xsd:element name="ID" type="xsd:int"/>     
    <xsd:element name="parentID" type="xsd:int"/>          
    <xsd:element name="categoryName" type="xsd:string"/>     
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

  • Troubleshoot JAXB "chameleon schema" Errors

    I am trying to use xjc from JAXB 2.1 to generate Java code for the HL7 CDA R2 format. Unfortunately, there appears to be errors in XML Schema files and so xjc fails with this exception.
    The XML Schema files can be downloaded from http://xreg2.nist.gov/cda-validation/downloads/archives/HITSP_C37_TestPackage_03Jan_2008.zip.There are total 7 Schema files, and their names are: LabCDA.xsd, LabPOCD_MT000040.xsd, TF_Vol3_Lab.xsd, datatypes.xsd, datatypes-base.xsd, NarrativeBlock.xsd and voc.xsd. The relationship of the Schema files are complex: LabCDA.xsd is the top level Schema and includes LabPOCD_MT000040.xsd; LabPOCD_MT000040.xsd incluedes datatypes.xsd, NarrativeBlock.xsd and voc.xsd and imports TF_Vol3_Lab.xsd; TF_Vol3_Lab.xsd incluedes datatypes.xsd; datatypes.xsd incluedes datatypes-base.xsd; datatypes-base.xsd includes voc.xsd; voc.xsd includes datatypes.xsd.
    [ERROR] (Relevant to above error) another "AdxpPostBox" is generated from here.
    line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.ADXP" is already in use. Use a class customization
    to resolve this conflict.
    line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) another "ADXP" is generated from here.
    line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.AdxpDeliveryInstallationArea" is already in use. U
    se a class customization to resolve this conflict.
    line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) another "AdxpDeliveryInstallationArea" is generated from here.
    line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.EnFamily" is already in use. Use a class customiza
    tion to resolve this conflict.
    line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) another "EnFamily" is generated from here.
    line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] Two declarations cause a collision in the ObjectFactory class.
    line 1048 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Related to above error) This is the other declaration.
    line 1048 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] Two declarations cause a collision in the ObjectFactory class.
    line 694 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes.xsd
    I have referred http://forums.java.net/jive/thread.jspa?messageID=278619 and http://forums.java.net/jive/thread.jspa?threadID=18631, and solved id problem, but Unfortunately I don't know how to deal with the errors above.So I am looking help at here.
    Edited by: wangxf_2000 on Jul 7, 2009 10:10 PM

    JAXB has extra rules that it uses to validate the schema. I believe this is for simplicity in the code generation side. For example, you can't have a maxOccurs="unbounded" element in an "all" complex element, it must be in a "sequence".
    In this case (and hopefully all others) fixing the schema so that JAXB will accept it is not going to hurt anything. A length requirement is both a maxLength and a minLength.
    There are some rules I don't appreciate that JAXB tacks on. For example, if you import another schema into your binding schema, and don't use every type specified in the imported schema, it will balk. Why? I can't think of a good reason. It really makes it a pain in the ass to create reusable custom XML types. I have to have a different schema for every type.

  • Can't create a JAXB binding for ejb-jar.xml using xjc

    Hi all,
    I have been trying to build a JAXB binding for EJB deployment descriptors, mainly because I have to update a hand-cranked ejb-jar.xml file on the fly with some additions that have come from a code generator.
    I have tried to use
    xjc ejb-jar_2_1.xsd j2ee_1_4.xsd ejb-jar_2_1.xsd
    xjc on the schema definitions I found at http://java.sun.com/xml/ns/j2ee/ but I can't get it to work. It produces reams of errors, see below for a short extract.
    Of course, someone could put me out of my misery and tell me where to find a binding that someone else has done. I can't be the first chimp on the planet that has wanted to do this!
    Any help much appreciated.
    errors:
    [WARNING] warning: "blockDefault" attribute of <schema> is not supported
    line 3 of xml.xsd
    [WARNING] warning: "finalDefault" attribute of <schema> is not supported
    line 3 of xml.xsd
    [WARNING] warning: <key> identity constraint will be ignored by JAXB validation
    line 117 of j2ee_web_services_client_1_1.xsd
    [WARNING] warning: <key> identity constraint will be ignored by JAXB validation
    line 115 of ejb-jar_2_1.xsd
    [WARNING] warning: <keyref> identity constraint will be ignored by JAXB validation
    line 129 of ejb-jar_2_1.xsd
    [WARNING] warning: <key> identity constraint will be ignored by JAXB validation
    line 145 of ejb-jar_2_1.xsd
    [WARNING] warning: <keyref> identity constraint will be ignored by JAXB validation
    line 159 of ejb-jar_2_1.xsd

    Exception initializing 'oracle.dbtools.raptor.MonitorJDBCAddin' in extension 'Oracle SQL Developer': oracle.classloader.
    util.AnnotatedNoClassDefFoundError:
    Missing class: oracle.jdbc.OracleDriverThe Oracle driver is not on the classpath.

  • How to send my ipad for technical assistance? He fell to the floor but still binds despite problems in the system

    How to send my ipad for technical assistance? He fell to the floor but still binds despite problems in the system

    Here you go: http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipod
    Good luck!

  • Bad Bind Variable Problem

    Hi
    I am trying to create a trigger and facing Bad Bind Variable problem.
    Plz let me know, what's the problem in this trigger.
    CREATE OR REPLACE TRIGGER Tender_tax_update AFTER
    INSERT
    OR UPDATE
    OR DELETE OF ITEM_QTY,ITEM_RATE,TENDER_ACC_QTY ON TENDER_ENQUIRY_ITEM_D REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    Declare
         v_amt TENDER_VENDOR_TAX_D.TAX_AMOUNT%TYPE;
         v_tax_ty TENDER_VENDOR_TAX_D.TAX_TYPE%TYPE;
         v_tax_cd TENDER_VENDOR_TAX_D.TAX_CODE%TYPE;
         v_ven_cd TENDER_VENDOR_TAX_D.VENDOR_CODE%TYPE;     
         v_item_cd TENDER_VENDOR_TAX_D.item_cd%TYPE;     
         v_tenno TENDER_VENDOR_TAX_D.tender_enquiry_no%TYPE;
    Begin
         if inserting then
              v_tax_ty:=:new.TAX_TYPE;
              v_tax_cd:=:new.TAX_CODE;
              v_ven_cd:=:new.vendor_code;
              v_item_cd:=:new.item_cd;
              v_tenno:=:new.tender_enquiry_no;
    select TAX_AMOUNT into v_amt from TENDER_TAX_DETAILS where tender_enquiry_no=v_tenno and TAX_CODE=v_tax_cd and TAX_TYPE=v_tax_ty and item_cd=v_item_cd and vendor_code=v_ven_cd;
    update TENDER_VENDOR_TAX_D set TAX_AMOUNT=v_amt where tender_enquiry_no=v_tenno and TAX_CODE=v_tax_cd and TAX_TYPE=v_tax_ty and item_cd=v_item_cd and vendor_code=v_ven_cd;
         end if;
    End Tender_tax_update;
    Database deails are as follows:
    TENDER_VENDOR_TAX_D
    Name Null? Type
    TENDER_ENQUIRY_NO NOT NULL VARCHAR2(8)
    VENDOR_CODE NOT NULL VARCHAR2(4)
    TAX_CODE NOT NULL VARCHAR2(4)
    PERCENTAGE NUMBER(5,2)
    TAX_AMOUNT NUMBER(15,2)
    ITEM_CD NOT NULL VARCHAR2(10)
    TAX_FLAG VARCHAR2(1)
    TAX_TYPE CHAR(3)
    TENDER_TAX_DETAILS
    Name Null? Type
    TENDER_ENQUIRY_NO NOT NULL VARCHAR2(8)
    VENDOR_CODE VARCHAR2(4)
    ITEM_CD VARCHAR2(10)
    TAX_CODE NOT NULL VARCHAR2(4)
    TAX_TYPE CHAR(3)
    TAX_AMOUNT NUMBER
    Message was edited by:
    user648065

    facing Band Bind Variable problem.Doesn't the error message tell you which bind variable is the problem?

  • Color Scheme Problems in Ultiboard

    Hi,  I've been having trouble with the color scheme problems in Ultiboard ever since I upgraded form 10.0 to 10.1.  The color schemes will not save in Ultiboard 10.1, even with the new patch 10.1.0.1, this problem is persistant.
    Here's the problem in detail: 
    In global Preferences, I click on "Colors", and then New Scheme, give it a name, and I define my colors.  However, when I open a new file, the colors are reverted to the default.  When I check the preferences again, the name that I have given to my color scheme is labeled as "User settings", and they are the same as the default colors.
    This is really annoying as every time I open a file, I have to change the color schemes.  It seems like these settings are not being saved in the user-configuration file for some reason or another.
    I have tried deleting my user-config file in the user directories, and started new user-config files, but to no avail, the problem is persistent.  The color just will not stay.
    How do I get around this problem?
    -J 

    Hello,
    Thanks for reporting this. I was able to reproduce the issue and created a defect report, ID: 112869.
    Fernando D.
    National Instruments

  • Jaxb -binding specific elements of schema to class

    Is there a way to bind only specific elements from a schema to a class instead of binding everything in the schema. If yes, how do you specify this.

    The <class> binding declaration customizes the binding of a schema element.
    http://java.sun.com/xml/jaxb/users-guide/jaxb-custom.html#customdesc_class

  • JAXB Binding problem

    Am having trouble building an external binding file to cope with the following xsd extract
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="urn:hl7-org:v3" xmlns="urn:hl7-org:v3" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hl7="urn:hl7-org:v3" xmlns:xlink="http://www.w3.org/TR/WD-xlink" xmlns:gsd="http://aurora.regenstrief.org/GenericXMLSchema" elementFormDefault="qualified">
         <xsd:complexType name="ANY" abstract="true">
              <xsd:attribute name="nullFlavor" type="cs_NullFlavor" use="optional"/>
         </xsd:complexType>
         <xsd:simpleType name="cs_NullFlavor">
              <xsd:restriction base="cs">
                   <xsd:enumeration value="NI"/>
                   <xsd:enumeration value="NA"/>
                   <xsd:enumeration value="UNK"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType name="cs_AddressPartType">
              <xsd:restriction base="cs">
                   <xsd:enumeration value="DEL"/>
                   <xsd:enumeration value="STTYP"/>
                   <xsd:enumeration value="STR"/>
                   <xsd:enumeration value="ADDRK"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="AD" mixed="true">
              <xsd:complexContent mixed="true">
                   <xsd:extension base="ANY">
                        <xsd:sequence>
                             <xsd:choice minOccurs="0" maxOccurs="unbounded">
                                  <xsd:element name="streetName">
                                       <xsd:complexType mixed="true">
                                            <xsd:complexContent mixed="true">
                                                 <xsd:restriction base="ADXP">
                                                      <xsd:attribute name="partType" type="cs_AddressPartType" fixed="STR"/>
                                                 </xsd:restriction>
                                            </xsd:complexContent>
                                       </xsd:complexType>
                                  </xsd:element>
                                  <xsd:element name="streetNameType">
                                       <xsd:complexType mixed="true">
                                            <xsd:complexContent mixed="true">
                                                 <xsd:restriction base="ADXP">
                                                      <xsd:attribute name="partType" type="cs_AddressPartType" fixed="STTYP"/>
                                                 </xsd:restriction>
                                            </xsd:complexContent>
                                       </xsd:complexType>
                                  </xsd:element>
                             </xsd:choice>
                        </xsd:sequence>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
         <xsd:simpleType name="cs_BinaryDataEncoding">
              <xsd:restriction base="xsd:NMTOKEN">
                   <xsd:enumeration value="B64"/>
                   <xsd:enumeration value="TXT"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="BIN" abstract="true" mixed="true">
              <xsd:complexContent mixed="true">
                   <xsd:extension base="ANY">
                        <xsd:attribute name="representation" type="cs_BinaryDataEncoding" use="optional" default="TXT">
                        </xsd:attribute>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
         <xsd:complexType name="ED" mixed="true">
              <xsd:complexContent mixed="true">
                   <xsd:extension base="BIN">
                        <xsd:attribute name="mediaType" type="cs" use="optional" default="text/plain">
                        </xsd:attribute>
                        <xsd:attribute name="language" type="cs" use="optional">
                        </xsd:attribute>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
         <xsd:complexType name="ST" mixed="true">
              <xsd:complexContent mixed="true">
                   <xsd:restriction base="ED">
                        <xsd:attribute name="mediaType" type="cs" use="optional" default="text/plain">
                        </xsd:attribute>
                        <xsd:attribute name="language" type="cs" use="optional">
                        </xsd:attribute>
                   </xsd:restriction>
              </xsd:complexContent>
         </xsd:complexType>
         <xsd:complexType name="ADXP" mixed="true">
              <xsd:complexContent mixed="true">
                   <xsd:extension base="ST">
                        <xsd:attribute name="partType" type="cs_AddressPartType">
                        </xsd:attribute>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
         <xsd:simpleType name="cs">
              <xsd:restriction base="xsd:token">
                   <xsd:pattern value="[^\s]*"/>
              </xsd:restriction>
         </xsd:simpleType>
    </xsd:schema>
    Above is a very much truncated extract of our xsd file
    I get XJC errors around 'streetNameType'
    any ideas on a binding definition that works with this ??
    Thanks

    This is the SAMPLE schema - that includes the earlier post
    (ie the earlier post shows datatypes.xsd)
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="urn:hl7-org:v3" xmlns="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:include schemaLocation="datatypes.xsd"/>
         <xs:element name="rootTest" type="test.smTest"/>
         <xs:complexType name="test.smTest">
              <xs:sequence>
                   <xs:element name="id" type="xs:anySimpleType"/>
                   <xs:element name="addr" type="AD" minOccurs="0"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

  • JAXB - binding several schemas at once

    If I have 4 schemas, each one including/chaining another (except the base schema of course). I want to bind all of them. I tried just puting all the schema names in the bind command but i get errors stating that 'class/interface with the same name is already in use'. If I do each individually I also get the same errors. How can I resolve this?

    Actually more like this from the cmd prompt:
    %JAXB_HOME%/bin/xjc.bat -p mypackage A.xsd B.xsd C.xsd D.xsd -d src
    Its not that it doesn't work but that it produces naming conflict errors. I just found something on google that might help me out though. Thanks

  • JAXB, Compiling a schema problem

    Hi,
    I�m trying to test the examples from the JWSDP tutorial (section "Using JAXB") and I get the following error when executing:
    C:\tutoriales\jwstutorial13\examples\jaxb\unmarshal-read>%JWSDP_HOME%\jaxb\bin\xjc.bat po.xsd -p primer.po
    parsing a schema...
    compiling a schema...
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
    Caused by: java.lang.NullPointerException
    at com.sun.tools.xjc.generator.SkeletonGenerator.generateStaticRuntime(SkeletonGenerator.java:233)
    at com.sun.tools.xjc.generator.SkeletonGenerator.<init>(SkeletonGenerator.java:128)
    at com.sun.tools.xjc.generator.SkeletonGenerator.generate(SkeletonGenerator.java:108)
    at com.sun.tools.xjc.Driver.generateCode(Driver.java:366)
    at com.sun.tools.xjc.Driver.run(Driver.java:215)
    at com.sun.tools.xjc.Driver._main(Driver.java:80)
    at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
    at com.sun.tools.xjc.Driver$1.run(Driver.java:60)
    I suppose could be configuration issues or path issues but I can�t get over it.
    Thanks

    http://forum.java.sun.com/thread.jsp?forum=34&thread=484038&tstart=0&trange=15

  • JAXB binding list of doubles

    Hi, I have a problem in binding elements containing a list of doubles. The elements may occur many times. In the generated code, doubles from different elements are returned in the same list. Is there any way to force the creation of a new java type, so that doubles from different elements can be accesed separately?
    Example:
    XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="qualified">
         <xsd:element name="main">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="foo" type="foo"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:complexType name="foo">
              <xsd:sequence>
                   <xsd:element name="bar" type="doubleArray" minOccurs="1" maxOccurs="unbounded"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:simpleType name="doubleArray">
              <xsd:list itemType="xsd:double"/>
         </xsd:simpleType>
    </xsd:schema>
    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <main xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="forum.xsd">
         <foo>
              <bar>1 2 3</bar>
              <bar>4 5 6</bar>
              <bar>7 8 9</bar>
         </foo>
    </main>Generated code:
         * Objects of the following type(s) are allowed in the list
         * double
        java.util.List getBar();Method getBar returns a list containing all the doubles from all the bar elements, instead of returning a list of objects of type Bar, where each object at its turn contains a list of doubles.
    Thank you

    Rogier_de_Groot wrote:
    So if you wanted to generate an XML document like I wanted to do, you'd use something other then JAXB?I have no idea. I haven't ever had any use for XML-to-Java mappings like that. And I don't know what your requirements are; it seems to me like JAXB would do but you have some complaints which appear in my opinion to be non-critical. I certainly wouldn't start writing a JAXB clone just based on what you posted here. For me, if it works and removes the requirement for me to do 6 months of design and development, I'm willing to overlook a few things.

  • JAX-WS binding files problem

    Hi,
    I'm trying to generate client code from WSDL with wsimport maven goal. I can generate the code, but I have this specific problem which I'm trying to solve by jaxb and jaxws external binding files.
    In my src/main/resources/wsdl directory I have
    - three WSDL files (let's say A.wsdl, B.wsdl, C.wsdl)
    - two XSD files(X.xsd, Y.xsd)
    All these files share the same targetNamespace.
    A.wsdl includes X.xsd through
    <xsd:include schemaLocation="X.xsd" />
    B.wsdl and C.wsdl include Y.xsd in the same manner.
    Since X.xsd and Y.xsd types are generated into one package, the ObjectFactory is overwritten.
    I'd like to generate X.xsd types into one package and Y.xsd types into another. I've not been able to exploit jaxb and jaxws binding to do that.
    Is this possible when X.xsd and Y.xsd have the same targetNamespace?
    The idea is shown in this binding file (it's not correct, but I've tried many combinations of these declarations without success)
    <jaxws:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
         xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <jaxb:bindings shcemaLocation="../main/resources/wsdl/X.xsd">
              <jaxb:schemaBindings>
                   <jaxb:package name="package_x" />
              </jaxb:schemaBindings>
         </jaxb:bindings>
         <jaxb:bindings shcemaLocation="../main/resources/wsdl/Y.xsd">
              <jaxb:schemaBindings>
                   <jaxb:package name="package_y" />
              </jaxb:schemaBindings>
         </jaxb:bindings>
    </jaxws:bindings>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Ram Swami,
    When I try to add services reference by using this:
    https://www.sunat.gob.pe/ol-ti-itcpgem-beta/billService?wsdl, it generates a baiscHttpBinding in my client config file, so could you please try to use the baiscHttpBinding in your client config file for instead to see if it works? The following article
    is about accessing Java service(Jax-WS) from C#.net, please try to check it:
    http://gayandenzil.blogspot.jp/2012/07/write-web-service-using-jax-ws-and.html .
    Besides, this forum is used to discuss the questions about the WCF Web Service, for the questions about the others web services, please try to post in this forum:
    http://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services .
    Thanks for your understanding.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Albums=Albums by Year?

    Alright, iTunes has managed to officially confuse me. I checked that I wanted the "Albums" listed as a way to sort my music and somehow iTunes now translates that as "Albums by Year", which is completely different. Is this a new iTunes quirk or can i

  • ITunes Match Subscription- what is this?

    Hello, aprarently we have an iTunes Match subscription and need to pay 24.95 Euros soon to renew this. I have no idea what this is for or what it does. If this is to use the iTunes store, then I would be unpleasantly surprised but maybe someone can a

  • Trex Search Result List

    Hello, i would change the Search Results from Trex. Goal: I have some Files that have the name "_de". When i found one of this file i would display in the Search Result List the name of the Folder where this file was found. So i want to add a functio

  • Lost the "recent file" folder in the dock next to the trash bin and cannot figure out how to replace it. Any thoughts?

    Lost the "recent file" folder in the dock next to the trash bin and cannot figure out how to replace it. Any thoughts?

  • GE70 0ND win7 driver problems

    Hi, I bought GE70 0ND and decided to go with win7 64bit, changed EC to non-win8 from MSI site, I read BIOS should be fine as is. I have problems with installing chipset drivers. Downloaded drivers from MSI site, made shure I downloaded win7 64bit dri