[JAXB 2.x] Defining the XML Schema Type for XmlElementDecl

How can an XML Schema Type (XmlSchemaType) be defined for an XmlElementDecl/Ref?
The classes are as follows:
    @XmlRegistry
    class ObjectFactory {
        // XmlSchemaType is desired, but cannot be used with XmlElementDecl/Ref: @XmlSchemaType(name = "unsignedShort")
        @XmlElementDecl(namespace = "urn:com:test:namespace", name = "char", scope = com.test.Arguments.class)
        @XmlJavaTypeAdapter(com.test.CharacterAdapter.class )
        public JAXBElement<Character> createArgumentsChar(Character value) {
            return new JAXBElement<Character>(_ArgumentsChar_QNAME, Character.class, com.test.Arguments.class, value);
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = { "arguments" })
    class Arguments {
        @XmlElementRefs( {
                @XmlElementRef(name = "char", namespace = "urn:com:test:namespace", type = JAXBElement.class),
        protected List<JAXBElement<?>> arguments;
    }The desired schema is as follows:
    <xs:element name="arguments" minOccurs="0">
        <xs:complexType>
            <xs:sequence>
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="char" type="xs:unsignedShort" />
                </xs:choice>
            </xs:sequence>
        </xs:complexType>
    </xs:element>However, when generating the schema from these classes (schemagen), the resulting "char" element type is "xs:string," not "xs:unsignedShort" as desired. What annotation can be used to indicate that the type should be xs:unsignedShort? If the addition of an annotation is not possible, are there any other ways to accomplish this?
Message was edited by: Shelley (Indicated "JAXB 2")

There are mappings between XSD type and Java type table on the Sun website.

Similar Messages

  • Where to find the Xml Schema details of the ABODE extension(xmlns:ADBE) for the JDF

    Hi There,
    I had been working on dynamic creation of JDF file for processing the job via Adode PDF print Engine. However, I need to know the various JDF attribtues which were available in the adode namespace [xmlns:ADBE="http://ns.adobe.com/JDF" this link was no more accessible via internet]
    Could you please provide with the link where i can find the adobe namespace details. OR
    Can some provide me the xml schema file for the adobe extension ?
    please reply asap.
    Thanks in advance.

    Hi Steve,
    Generally when you need to find out parameters you would test a working one to see what is present so you can just replicate this.
    Therefore I would suggest that you set the Business partner subscription for the xml site type and other required settings.  Then make a change to a business partner and see the output of the xml file to see the parameters you will need.
    Hope this gets you on the right path for the solution.
    Cheers
    Andrew

  • 3rd party integration: How to get XML Schema (.xsd) for a custom entity, to use with a mapper

    Is there an easy way to get the xml schema/DTD for a custom entity, specifically an .XSD file for that entity (which will then be used to create a map to be able to transform the fields of the entity to a 3rd-party message format)?
    So have a custom entity with lots and lots of fields. Each of the fields will map to a differently named field to match the schema of the 3rd party entity. A very common situation. Looking to use a tool like the Biztalk mapper or Altova's MapForce to generate
    an .xslt file to transform the downloaded entity (service.Retrieve with all columns) to the new format. (Will implement a typical VETR pattern.)
    Apparently with CRM 4 there was a call that provided this, but from 2011 has not been available. Working with a crm 2015 system.

    That will give a descriptor of the table and allow creation of an .XSD file, but it's really complex in terms of types, and the there's type conversion. It might be an easy way to get a schema, with the downside being it's hard to use that schema. 
    It seems easier to do a fetch of the record with all fields filled in using service.Retrieve, and then converting this to xml, using Microsoft's guidance leads to using https://msdn.microsoft.com/en-us/library/hh675409.aspx which will serialize the entity
    into XML with all the fields converted to type string, and with complex fields likewise converted to strings with additional information about the type. 
    Using this it's possible using an number of tools to create an easier to use .XSD file.
    However, it would seem most integrations of this type are using 3rd party CRM connectors. Perhaps this is why Microsoft hasn't provided anything direct (and took away what they did have in crm4.0 due to it generating a hard to use .XSD or due to letting
    their partners continue income streams from selling connectors").
    But without using 3rd party connectors, or following the still tedious method of generating .XSD (a useable .xsd), have not yet come up with an easy, automatic way to get an .XSD or to easily integrate with 3rd party message format.

  • Problem with running sample code from XML Schema Processor for Java

    Hi there,
    I downloaded the XML Schema Processor for Java and tried it out. Unfortunately, it failed at the first step. FYI, I included all xmlparserv2.jar and xmlschema.jar in my classpath.
    I compiled XSDSample.java with a warning: XSDSample.java uses a deprecated API. Recompile with "-deprecation" for details. There was no problem with compiling XSDSetSchema.java.
    When I tried to run report.xml by typing java XSDSample report.xml, I got Parsing report.xml
    NonParserException: null.
    I guess that report.xml from the sample is not valid.
    Could any one give me a hint? Any suggestion would be greatly appreciated.
    ---Denali
    null

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • WE60 - Error while generating the xml schema

    Hi
    Using the transaction WE60 I am trying to generate an XML schema for the BASIC type : DEBMDM06, Segment release - 7 and record type version - 3. Following error message is displayed. "Structure of segment E1T023W is unknown". Kindly let me know how to generate an XML schema successfully and what is the reason for this error to come up
    Regards
    Aruna

    Hi Aruna,
    It seems a dictionary error but it doesn't occurs to me. I can download the XML schema without problems in SAP ECC 6.0.
    If you let me know your email I can send it zipped to you.
    Reward points if helps.
    Roger

  • Not able to pass cyclic XML schema type to a webservice method

    I have a webservice method called getData(GetDataDocument
    gDoc).
    I constructed a request with object (which exactly satisfy
    the XML schema def) to call up the getData(). [From my java client
    also I did the same; but the java classes have been generated using
    apache's xmlBeans; this works fine with the same kind of request].
    But the soap request constructed from flex does not get
    generated with all the values that I set in the request object.
    On further observation, I found out that if the schema
    involves cyclic elements, the soap request is not getting
    constructed as desired.
    My schema def:
    <complexType name="PredicateBagType">
    <sequence>
    <choice>
    <element maxOccurs="unbounded" minOccurs="0"
    name="PredicateBag" type="tns:PredicateBagType"/>
    <element maxOccurs="unbounded" minOccurs="0"
    name="BinaryPredicate" type="tns:BinaryPredicateType"/>
    <element maxOccurs="unbounded" minOccurs="0"
    name="UnaryPredicate" type="tns:UnaryPredicateType"/>
    </choice>
    </sequence>
    <attribute name="contextNode"
    type="tns:contextNodeIDType"/>
    <attribute default="false" name="negate"
    type="boolean"/>
    <attribute name="type"
    type="tns:PredicateBagTypeType"/>
    </complexType>
    Note that the PredicateBagType may contain another
    PredicateBagType.
    I have constructed my request with objects in my flex
    application . Though I have set the BinaryPredicate object in my
    PredicateBag object, the soap request constructed looks like this
    which is not desired
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <tns:get_Data maxPrograms="0" personalInfoUse="false"
    xmlns:tns="urn:tva:transport:2005">
    <tns:QueryConstraints>
    <tns:PredicateBag contextNode="1" negate="false"
    type="AND"/>
    </tns:QueryConstraints>
    <tns:RequestedTables>
    <tns:Table type="ProgramInformationTable"/>
    </tns:RequestedTables>
    </tns:get_Data>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>.
    If I comment out the PredicateBagType choice in my xsd, the
    flex application constructs the soap request looks like this.
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <tns:get_Data maxPrograms="0" personalInfoUse="false"
    xmlns:tns="urn:tva:transport:2005">
    <tns:QueryConstraints>
    <tns:PredicateBag contextNode="ProgramInformation"
    negate="false" type="AND">
    <tns:BinaryPredicate fieldID="Genre" fieldValue="Fiction"
    test="contains"/>
    </tns:PredicateBag>
    </tns:QueryConstraints>
    <tns:RequestedTables>
    <tns:Table type="ProgramInformationTable"/>
    </tns:RequestedTables>
    </tns:get_Data>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    This request holds good. But I cannot comment out the
    PredicateBagType from my choice. Is this an issue with soap request
    construction issue in Flex..?

    Yes, <choice> is just "partial" supported in Flex 2 .
    read this
    link
    for partial and not supported tags
    Partially supported XML Schema structures
    The following XML Schema structures or structure attributes
    are only partially implemented in this release:
    <choice>
    <all>
    <union>
    regards
    kcell

  • Oracle BI Administration Tool 11g - Fields have the XML data type

    I'm using Oracle BI Administration Tool 11.1.1.3.0 and I need to import Metadata an Oracle table where same fields have the XML data type.
    Please, there is someone can tell me what I must do to define these fields in Administration Tool?
    Regards.

    Hi,
    in u r RPD -->Try to select import Connection Type as : XMLA then give it the URL of u r analysis services 2000 then u can able to import it.
    refer:
    http://www.biblogs.com/2008/02/01/obiee-hybrid-olap-reporting-using-ms-analysis-services-oracle/
    http://www.rittmanmead.com/2007/11/essbase-integration-with-obiee-101331/
    Thanks
    Deva

  • I am trying to register the xml schema and getting error

    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL => 'http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd',
    4 SCHEMADOC => bfilename('XMLDIR','fgdc-std-001-1998.dtd'),
    5 CSID => nls_charset_id('AL32UTF8'));
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00247: invalid Document Type Declaration (DTD)
    Error at line 45
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2
    the xml i am trying to register is
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd">
    <metadata>
    <idinfo>
    <citation>
    <citeinfo>
    <origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    etc.
    Pls help me in registering the xml schema.

    I am registering fgdc-std-001-1998-sect01.xsd, but it is
    giving error about citeinfo element.XSD is
    <?xml version="1.0" encoding="utf-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://www.ascc.net/xml/schematron" blockDefault="#all">
    <xsd:element name="idinfo" type="idinfoType"/>
    <xsd:complexType name="idinfoType">
         <xsd:sequence>
              <xsd:element ref="citation"/>
              <xsd:element ref="descript"/>
              <xsd:element ref="timeperd"/>
              <xsd:element ref="status"/>
              <xsd:element ref="spdom"/>
              <xsd:element ref="keywords"/>
              <xsd:element ref="accconst"/>
              <xsd:element ref="useconst"/>
              <xsd:element ref="ptcontac" minOccurs="0"/>
              <xsd:element ref="browse" minOccurs="0" maxOccurs="unbounded"/>
              <xsd:element ref="datacred" minOccurs="0"/>
              <xsd:element ref="secinfo" minOccurs="0"/>
              <xsd:element ref="native" minOccurs="0"/>
              <xsd:element ref="crossref" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="citation" type="citationType"/>
    <xsd:complexType name="citationType">
         <xsd:sequence>
              <xsd:element ref="citeinfo"/>
         </xsd:sequence>
    </xsd:complexType>
    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL => 'fgdc-std-001-1998-sect01.xsd',
    4 SCHEMADOC => bfilename('XMLDIR','fgdc-std-001-1998-sect01.xsd'),
    5 LOCAL => TRUE,
    6 GENTYPES => TRUE,
    7 genbean => FALSE,
    8 GENTABLES => FALSE,
    9 force => False,
    10 CSID => nls_charset_id('UTF8'));
    11 END;
    12 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00021: undefined element "citeinfo"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2
    I am unable to understand xsd, is there any manual to understand
    xsd or some literature.I need to create new xsd as per requirements
    also.But Pl could you help me right now with registering current xsd.

  • XML SCHEMA registration for XML TYPE (storing XML files in Oracle 10g)

    I have created the XML Schema for the XML file stored in Oracle 10g and also added this Schema into the database. I have related that schema with the column in the table which contains the XML file. When i execute the query to fetch the data from the stored file i am getting a blank resultset. Is registering the XML Schema is necessary, if yes then please let me know the process of doing it. I have tried following steps to register Schema, but it is not working
    Step1:
    DECLARE
    v_return BOOLEAN;
    BEGIN
    v_return := dbms_xdb.createFolder('/home/');
    v_return := dbms_xdb.createFolder('/home/DEV/');
    v_return := dbms_xdb.createFolder('/home/DEV/xsd/');
    v_return := dbms_xdb.createFolder('/home/DEV/messages/');
    v_return := dbms_xdb.createFolder('/home/DEV/employees/');
    COMMIT;
    END;
    STEP 2:
    Connecting To XML DB
    Step3:
    Register XML schema
    I am failing to execute step number 2 and hence not able to register the schema also.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by sudeepk:
    If a java exception is thrown probably during ur install u might have forgotten
    grant javauserpriv to scott;
    grant javasyspriv to scott;
    Thanks
    [email protected]
    <HR></BLOCKQUOTE>
    Thank you!!!

  • How did i use the xml schema in WLS 6.0 and up

    i check the WLS6.0 console that can setup the xml dtd
    but how did i setup the xml schema in WLS6.0 and up ??

    Hello-
    The knowledge base: "Can Matlab for Windows Call the National Instruments GPIB Driver?" Also applies to this question as well. This article is very extensive. Try searching on ni.com for "+matlab +gpib" for more details.
    Randy Solomonson
    Application Engineer
    National Instruments

  • Drag and drop the xml schema?

    hi all
    i am creating a GUI. i am using splitpane to split my Frame. and my left split pane contains the XML schema in the form of a JTree. and i need to drag and drop the nodes of a JTree on to right split pane which sub divided in to some regions. i can able to open the xml file in to left split pane as a Jtree. but unable to drag and drop the Nodes in to rightsplit pane.
    any e book or sample code is greatly appriciated.
    thanks in advance.
    karthik

    Hi
    I am new to Oracle but not to VS. I have downloaded and installed the newest tools for Developer, having first tried the install for VS2003.net (which refused to install on my VS 2005.) I got the beta download and installed it, but my oracle explorer shows nothing. Any attempt to add a connection results in an error ORA-12560:TNS:protocol adaptor error. I had the full install of 10g r2 on my notebook, but removed it and opted for the XE version. I removed the Oracle_Home environment variable prior to installing XE. I am trying to connect to the HR database, and the account is unlocked. I saw a reference to the tnsfiles file, and that seems to be the problem, but I don't know what to do about it. Thanks in advance to anyone who can offer help.
    Bruce
    [email protected]

  • Configuration setting required to configure the O/P type for GR

    Hi,
    Can you explain or give the link how to configure the O/P type for GR, Return delivery , like WE03, WE01 etc.
    regards,
    zafar

    Hi,
    For custom print, you need to maintain below settings.
    1. Maintain Condition Tables
    Menu Path: IMG / Materials Management / Inventory Management and Physical Inventory / Output Determination/ Maintain Condition Tables
    Transaction: M703
    2. Maintain Access Sequences
    Menu Path: IMG / Materials Management / Inventory Management and Physical Inventory / Output Determination/ Maintain Access Sequences
    Transaction: SPRO
    3. Maintain Output Types for IM Documents
    Menu Path: IMG / Materials Management / Inventory Management and Physical Inventory / Output Determination / Maintain Output Types
    Transaction: M706
    4. Maintain Output Determination for IM Documents
    Menu Path: IMG / Materials Management / Inventory Management and Physical Inventory / Output Determination / Maintain Output Determination Procedures / Condition: Procedure
    5. Create IM Documents Condition Records
    Menu Path: IMG / Materials Management / Inventory Management and Physical Inventory / Output Determination / Maintain Condition Records / Create Condition: Inventory Mgmt
    Transaction: MN22
    Also check following:
    1 Define Printer...at OMBR
    2. Enable material doc printout at OMB5
    3. Assign form at OMBU
    4. Also Assign the printer to WE01 output type in OMJ3 Tcode with combination of Plant + Storage location
    5. Maintain the condition record in MN21 or NACE for individual slips or collective slips.
    After doing the above steps you need to select the print button when you are doing MIGO_GR and select the slip types like individual or collective.
    If you maintain the condition record as print immediately you will get the print out immedialtley when save the document otherwise run T.code MB90.
    Note:
    WE01-INDIVIDUAL SLIP PRINT SELECTION IN MIGO
    WE02-INDIVIDUAL SLIP ALONG WITH INSPECTION SLIP
    WE03-COLLECTIVE SLIP IN MIGO
    Regards,
    Biju K

  • Power View in SharePoint Server - The data extension type for a data source is not valid

    Hi All,
    All of a sudden I am getting following error when trying to create Power View report using shared report data source (no error testing the connection):
    "The current action cannot be completed. The data extension type for a data source
    'http://dev/Shared Ducuments/Sales.rsds' is not valid for this operation"
    I already have a data source (I had created it after creating my site collection a week ago) and when I use this source to create Power View report then there is no error but I am getting above error when I create another similar data source and use it to create
    a Power View report.
    Please help me to resolve the error.
    Thanks

    I am going nuts! I had selected 'Analysis Services' instead of 'Microsoft BI Semantic Model for Power View'

  • Can I change the default 'File Type' for PL/SQL Source File to '*.prc' ?

    Want to change the 'default' extension for PL/SQL source to '*.prc'
    When navigating 'File' / 'Save As', and selecting the 'File Type' list box,
    The default 'File Type' for PL/SQL Source File is '*.pls'.
    Can I change the default 'File Type' for PL/SQL Source File to '*.prc' ?
    I have followed , 'Tools', 'Preferences' , 'File Types' and added '.prc' as 'Sql Script' file type, because (PL/SQL Source) is not present in the list.

    You can certainly overwrite the 'Save As' extension as you are saving the file. I have added an ER for more control over this functionality.
    sue

  • What is the logical message type for Inbound Credit Memo (MM)

    Hi Folks,
    What is the logical message type for Inbound Credit Memo (MM)
    Plz explain.
    Thanks,
    Matt

    Hi Mat,
      The logical message types are as follows.
      /DSD/HH_CREDITDATA             DSD Credit Exposure and Credit lLmit
      CREADV                         Credit memo display
      CRESTA                         Copy credit status (DebtorCreditAccount)
      SBINV                          Credit memo procedure with invoice creation
      SBWAP                          SD Credit Memo Procedure with Automatic Postin
    You can search for message types in database table EDMSG.
    Regards,
    Vimal.

Maybe you are looking for

  • Experts call a operating system command

    Hello, I have following question about experts. It is possible with OMBPLus or experts call a operating system command e.g svn checkout? It would great if you give me a example! goodbye

  • Fonts not displayed correctly in Live View Dreamweaver CS4

    I have a site that uses the Nuptial Script font.   Everything is displayed correctly in Design View and in IE and FireFox. But LiveView does not display the font correctly; in fact, the text with Nuptial Script is not readable in LIveView.    If I ch

  • My iPod is disabled..

    I am wanting to give my iPod to my younger sister, but I forgot the passcode to unlock it. She tried random passcodes to see if they would work, and now my iPod is disabled. It says to log into iTunes, but when I do, it keeps telling me that its lock

  • Should i buy the ipod 5g if I have an ipod 2g?

    i dont know what do, my ipod 2g it works very well but... i don't.. to many updates coming with the new ipod touch 5g...

  • "iPodService could not be deleted"

    When I plug my Ipod in, the hardware icon pops up in my taskbar and in iTunes it says the software isnt installed properly. So i do what it says then it says "iPod Service could not deleted". When i try to update it or restore it i get an iPod error.