JAXB: Multiple Schema

I have three XSD files, let say A.xsd, B.xsd and C.xsd
B.xsd and C.xsd are including A.xsd
A.xsd has some global complex/simple types, that other xsd(A,B) uses.
How should I compile these schemas, so that classes generated from A.xsd are shared between classes of B.xsd and C.xsd?
I need this, so that I can write some utility methods for common types.
Sanjay

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] Multiple imports in the root node

    Hello,
    I use JAXB and am doing this scenario : unmarshalling an XML document created manually, and automatically marshalling another from the generated Java code.
    This is a multiple schemas / multiple imports issue.
    I would like the 2 XML documents to be similar, but in the first one, I get :
    <?xml version="1.0" encoding="UTF-8"?>
    <aaa:first xmlns:aaa="http://aaa" xmlns:bbb="http://bbb">
    </aaa>
    and in the second :
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <aaa:first xmlns:aaa="http://aaa" xmlns:ns1="urn:abc" ...>
    <bbb:second xmlns:bbb="http://bbb">
    </bbb>
    </aaa>
    So, how is that possible to import multiple namespaces (xmlns) in a single node please ? It seems that JAXB does the import only when needed, and won't group all the imports in the root node.
    (moreover, how can I disable the "standalone" attribute in the header of the generated XML document please ?)
    Thanks in advance.

    Ok, I found a solution to get all namespaces placed in the root of the generated XML document : one have to implement a NamespacePrefixMapper
    marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper",new NamespacePrefixMapperImpl());and redefining its ' public String[] getPreDeclaredNamespaceUris()' method.
    For now, the problem is that namespaces declared there are somehow static. In fact, when unmarshalling Java objects from an XML document, it seems that this document namespaces are lost.
    Do you know a way these namespaces would be kept somewhere, associated with the unmarshalled object ? I need these namespaces in the case that I would create another XML file from it in the future.
    It's seems logical to keep this with the object, so did I miss something please ?

  • Multiple schemas with Marsheller

    Hello there! Is it possible to have multiple schemas associated with a marsheller? I could not find a way to do this.
    My problem is that I have several schemas that extends a base one. During runtime I do not know yet what to expect, so I should check for all possible schemas. Also I can't join my schemas, because they are deployed on runtime.
    I was looking for a way to join schemas. Is it possible?
    Regards

    I didn't try include because the Schema specs said that both schema files have to be for the same namespace. Sure enough when I tried it I got this error:
    src-include.2.1: the targetNamespace of the schema 'http://temputil' must be identical to that of the including schema 'http://temp'.
      line 2 of poutil.xsd
    src-resolve.4: Components from namespace 'http://temputil' are not referenceable from schema document 'file:/D:/Download/jaxb/jaxb-1.0-beta/working/DHSample/po.xsd'.
      line 11 of po.xsdIf I make both namespaces the same then include works fine. I also don't have to include both files in build.xml. Just build the including file. But, I'm trying to get the case to work where one namespace uses types from another namespace.

  • Multiple Schemas under one user account with XE 10g

    Hi,
    I am using (learning) XE 10g. I would like to know if it is possible to have multiple schemas under one user account and have the schemas logically separated. As of right now, I have three schemas that I am working with, each one under a different user account. This is inconvenient, because I have to logout of one user account and login to another user account simply to be able to work with another schema.
    Thanks

    It isn't possible to have multiple schemas under one database user account. It is of course possible to grant rights to other database users, and or roles, in order to allow access to the tables/data from other accounts. In Oracle there is a one-one mapping between schema and user.
    Niall Litchfield
    http://www.orawin.info/

  • One application with Multiple schemas- common application frame work

    Hi All,
    I am trying setup a common application frame work in apex. Please help me.
    How to achieve this.
    Creation of one application attached to different schemas at run time. So that my application maintaince is going to be easy instated of creating copies of same application.
    More details:
    1. I have one application with 100 pages pointing to a schema dev_common in one workspace APP_COMMON. I have 50 schemas with same structure of dev_common schema with different set of data ( because of large amount of data).
    So I want to create one application attached to different schemas.
    2. And another thing is I have 100 users, the user can work on 1 or multiple schemas ( I mean same application with different schemas attached)
    Any help much appreciated.
    Thanks,

    Thank you for the reply.
    >> b) I think you have to give access rights for the dev_common and app_common to all users.
    Dev_common schema is a kind of placeholder. I have 50 schemas same as dev_common because of different business requirements but the front end is same for all 50 schemas. How can we create one application used for 50 schemas instead of creating 50 applications and 50 workspaces.
    Please help me.

  • Multiple Import into Multiple schemas in a single Database server ?

    Is it possible to create a multiple import into multiple schema in a single DB server ?

    Hi,
    Yes, You can do it.. With Multiple Export File..it may cause some Performance issue, so need to check your Server configuration before do that..

  • Validate a XML file against multiple schema files

    Hello everybody!
    How can I validate a XML file against multiple schema files?
    I have the following XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <bulkCmConfigDataFile xmlns:es="SpecificAttributes.3.0.xsd"
                             xmlns:xn="genericNrm.xsd"
    xmlns="configData.xsd">
    <fileHeader fileFormatVersion="32.615 V4.2" vendorName=""/>
    <configData dnPrefix="Undefined">
    <xn:SubNetwork id="3G">
    <xn:SubNetwork id="RNC01">
    <xn:MeContext id="RNC01">
    <xn:VsDataContainer id="RNC01">
    <xn:attributes>
    <xn:vsDataType>vsDataMeContext</xn:vsDataType>
    <xn:vsDataFormatVersion>SpecificAttributes.3.0</xn:vsDataFormatVersion>
    <es:vsDataMeContext>
    <es:userLabel>RNC01</es:userLabel>
    <es:ipAddress>172.21.3.17</es:ipAddress>
    <es:neMIMversion>vF.5.0</es:neMIMversion>
    </es:vsDataMeContext>
                                  </xn:attributes>
    </xn:VsDataContainer>
    </xn:MeContext>
    </xn:SubNetwork>
    </xn:SubNetwork>
    </configData>
    <fileFooter dateTime="2006-11-24T11:56:07Z"/>
    </bulkCmConfigDataFile>
    I want to load this file into a table, validate it (against SpecificAttributes.3.0.xsd, genericNrm.xsd and configData.xsd) and query that table. How would the INSERT .. and the SELECT ... for userLabel attribute look like?
    Many thanks!

    Hi Peter,
    Please use the validateXML BPEL Property : This property validates incoming and outgoing XML documents. If set to true, the Oracle BPEL Process Manager applies schema validation for incoming and outgoing XML documents. This property is applicable to both durable and transient processes. The default value is false.
    Cheers
    A

  • Multiple schema, but instance doc does not have namespace

    Is it possible to successfully validate an instance document without namespaces against multiple schema with different namespaces?
    example:
    this is the normal xml which is valid with all the namespace:
    <MyRoot dateTime="040112061834" instanceIdentifier="NTNDEC13541" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://org.schema.ntn" xsi:schemaLocation="http://org.schema.ntn ntn.xsd" xmlns:cbc="http://org.schema.cbc cbc.xsd">
         <cbc:MessageVersion>040</cbc:MessageVersion>
         <cbc:SenderID>2344134</cbc:SenderID>
         <cbc:RecipientID>3485774</cbc:RecipientID>
         <cbc:TotalNumberOfDeclaration>1</cbc:TotalNumberOfDeclaration>
    </MyRoot>but I want to remove all namespace
    <MyRoot>
         <MessageVersion>040</MessageVersion>
         <SenderID>2344134</SenderID>
         <RecipientID>3485774</RecipientID>
         <TotalNumberOfDeclaration>1</TotalNumberOfDeclaration>
    </MyRoot>now is it possible to validate programmatically using sax the above xml against multiple schema? can i do it without any namespace at all??
    thanks

    Hi Larry, Thanks for your reply along with Muppet Mark, If I changed the color settings originally it was not my intension, I was simply just opening the next project to work on and viola’ “missing profiles”.
    Attachment (picture) 7 was my last setting for color prior to your email, and yes I was messing around with this last night comparing it to one of our old G4’s, so I can’t remember where it started out before I got my hands on it.
    Attachment (picture) 8 is my current settings based on your email recommendations.
    Attachment (picture) 6 is the message I receive when I open any files created prior to these changes I just made. However after I open and resave the file I no longer receive this (picture 6) message.
    My question is will my color be back to where it was before the problem started last week. In looking over one of the files I opened (I design/build transportation maps btw) most of the color is where I usually have it set however some colors were fractional as if they were converted from spot colors. SO I’m not sure what to do except go through all the known colors and make sure they are where I usually would set them, or do you have a better suggestion.
    Oh by the way – for all you guys that are helping lunch is on me at McDonalds on Michigan St in Grand Rapids, MI!!
    #7
    #8
    #6

  • Help With Multiple Schemas In Multiple Environments

    Dear Oracle Forum:
    We have a bit of controversy around the office and I was hoping we could get some expert input to get us on the right track.
    For the purposes of this discussion, we have two machines, development and production. Currently, on each machine, we have one database with multiple schemas, say, one for sales data and another for inventory. The sales data has maybe 200 tables and the inventory has another 50. About 12 times a year, once a month, we have a release and move code from dev to prod. The database is accessed by several hundred Pro*C and Pro*Cobol programs for online transaction processing.
    The problem comes up when we need to have multiple development environments. If I need to work on something for May that requires the customer address field to be 50 characters and somebody else is working on something for July that requires the customer address field to be 100 characters, we can’t both function in the same schema. We have a method of configuring running programs to attach to a given schema/database. Currently, everything connects to the same place. We were told that we should not have the programs running as the owners of the schemas for some reason so we set up additional users. The SALES schema is accessed with the connect string: SALES_USER/[email protected]. (I don’t know where we got dot world from but that is not the current discussion.)
    One of the guys said that we should have 12 copies of the database running, which is kind of painful to think about in my opinion. Oracle is not a lightweight product and there are any number of ancillary processes that would have to be duplicated 12 times.
    My recommendation is that we have 12 schemas each for sales and inventory with 12 users each to access them. We would have something like JAN_SALES_USER, FEB_SALES_USER, etc. Each user would have synonyms set up for each of the tables it is interested in. When my program connects as MAY_SALES_USER, I could select from the customer table and I would get my 50 character address field. When the other user connects as JUL_SALES_USER, he would get his 100 character address field. Both of us would not know anything different.
    Another idea that came up is to have a logon trigger that would set the current schema for that user to the appropriate base schema. When JUL_SALES_USER logs in, the current schema would be set to JUL_SALES, etc. This would simplify things by allowing us to avoid having something like 2400 synonyms to maintain (which could be automated without too much difficulty) but it would complicate things by requiring a trigger.
    There are probably other ways to go about this we have not considered as yet. Any input you can give will be appreciated.
    Regards,
    /Bob Bryan

    Hans Forbrich wrote:
    I'd rather see you with 12 schemas than with 12 databases. Unless you have lots of CPUs to spare ... and lots of cash to pay for those extra CPU licenses.
    Then again, I'd take it one step further and ask to investigate the base design. There should be little reason to change the schema based on time. Indeed, from what little I know of your app, I'd have to ask whether adding a 'date' column and appropriate views or properly coded SQL statements might simplify things. Interesting. If we were to have one big Customer table with views for each month, how would we handle the case where the May people have to see 50 character address and July have to see a 100 character address field. I guess we could have MAY_ADDRESS VARCHAR2(50) and JULY_ADDRESS VARCHAR2(100) and take care to make sure that people connecting as May can only see the May columns, etc. This is simpler than multiple schemas?
    I may have overly simplified things in my effort to get something down that would not require too much explanation. The big thing is that multiple people are doing development and they have to be independent of each other. If we were to drop a column for July, the May people will have trouble compiling if we don’t keep things separate. It is not a case of making the data available. The data in development is something we cook up to allow us to test. The other part is the code we compile now will be released to production one of these times. In production, there is only a need for one database.
    We are moving from another database product where multiple databases are effectively different sets of files. We have lots of disk space so multiple databases were no problem. Oracle is such a powerful product; I can’t believe there is not some way to set up something similar.

  • Using Multiple Schemas in one Application

    Is it possible to have multiple schemas from the same database in one applicaiton. In APEX we have added multiple schemas to our workspace but when we create a form or report only one schema seems to be available.

    Miroslav wrote:
    Your application has a parsing schema. All other schemas have to give appropriate grants to it to be available to your application.Miroslay is right, if you use the INTERNAL workspace to add additional schemas to a workspace, APEX does not take care of any grants between the schemas. APEX can not know how or if you might want the schemas to interact with one another. All this does is gives the workspace the ability to utilise that schema, such as adding it as parsing schema to any applications in the workspace.
    You can switch to the secondary schema in SQL Workshop and add grants from there, e.g.
    grant select on SECONDARY_SCHEMA.MY_TABLE to PARSING_SCHEMA;

  • Browsing multiple schemas in SQL Developer

    Hello,
    I have been using Toad before and I just started using SQL Developer. In Toad we have the abillity to browse through multiple schemas by selecting the appropriate schema from the drop down list. However when I login via SQL Developer it seems I get to browse only the schema associated with my username even though I can run queries against tables that reside in other schemas. How do I browse through multiple schemas via SQL Developer? I am using SQL Developer v1.2.1.
    Regards.

    Hi,
    Look for "Other Users".
    K

  • One dump file inport into multiple schema

    Hi,
    I need to import one dumpfile to multiple schema but it's not working.
    impdp "'system/redhat as sysdba'" dumpfile=CTBNGUMB_14022011.dmp logfile=CTBNGUMB_IMP_1602.log directory=DUMP_DIR remap_tablespace=NGUMB_TS:TRUSTWARE01 remap_tablespace=TRUSTWARE:TRUSTWARE01 remap_tablespace=NEXTGENREF:TRUSTWARE01
    remap_schema=CTBNGUMB:CTBNGUMB_1,CTBNGUMB:CTBNGUMB_2,CTBNGUMB:CTBNGUMB_3,CTBNGUMB:CTBNGUMB_4
    how can import one dumpfile to multiple schema?
    Edited by: 819136 on Feb 16, 2011 5:53 AM

    Hi,
    I want same schema import into different schams (users) is it possible?
    OS Version is Linux 4
    Oracle DB Version is : 10.2.0.4
    While importing getting the below error
    [oracle@sos02 10.2.0]$ impdp "'system/redhat as sysdba'" dumpfile=CTBNGUMB_14022011.dmp logfile=CTBNGUMB_IMP_17022011.log directory=DUMP_DIR remap_tablespace=NGUMB_TS:TRUSTWARE01 remap_tablespace=TRUSTWARE:TRUSTWARE01 remap_tablespace=NEXTGENREF:TRUSTWARE01 remap_schema=CTBNGUMB:CTBNGUMB_1 remap_schema=CTBNGUMB:CTBNGUMB_2 remap_schema=CTBNGUMB:CTBNGUMB_3 remap_schema=CTBNGUMB:CTBNGUMB_4
    Import: Release 10.2.0.4.0 - Production on Thursday, 17 February, 2011 9:24:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39001: invalid argument value
    ORA-39046: Metadata remap REMAP_SCHEMA has already been specified.

  • Does XDB supports validating xml against multiple schemas?

    The XMLType has some methods for validating an xml documents against a schema, e.g., SCHEMAVALIDATE, etc.. does XDB support validating xml against multiple schemas (Just like what JAXP or Xerces have done)? Or what's the current situation about this issue? thanks.

    did you try using the import schema element instead of the include elemnt?

  • Database Design - multiple schemas

    Hi!
    We're currently designing a DB for an AUTHENTICATION SYSTEM where several users from different companies (around 40) will have to be authenticated -- connected to ORACLE. Authentication and faster recovery is important.
    Recovery/Backup
    An issue raise where what if the schema encountered a problem then of course you have to backup the entire data. So we are considering to use multiple schemas.
    One Company = One Schema
    So if one schema is down then other schemas will not be affected and faster to recover.
    Actualy, we're quite hesistant to use multiple schemas because of maintainability -- Managing different schemas and too much burder for our developers.
    Will the idea of having multiple schemas be advantageous to what we want to achieve?
    Is this a good design or any other idea to handle this kind of situation?
    Can Partitioning do the same?
    Thanks a lot

    Advantages of multiple schemas:
    - each schema is entirely separate
    - you can maintain at different times/dates for different companies
    - different schemas could be on different databases / servers
    Disadvantages
    - any 'shared' data may have to be duplicated (but you can always use a shared schema for reference data)
    - yes, you have to maintain each schema separately (but that would be by scripts, and at least they'd be well tested!)
    The dictionary (SYS tables) will be somewhat larger (40 copies of table, index, pl/sql definitions)
    - you'll have 40 identical sets of SQL cached; they all look the same, but relate to different schemas. So you need a bigger SGA.
    Can Partitioning do the same?No - partitioning is a solution to a physical problem, not a security problem
    Is this a good design or any other idea to handle this kind of situation?I think either way works - it depends on size, number of users, are you using a third tier, etc.
    Or, with a single schema, you can use VPD - virtual private database (otherwise known as FGAC - fine grained access control or RLS - row level security).
    See eg http://builder.com.com/5100-6388_14-5062064.html and also Ask Tom http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:70287097313911 which refers to the documents.
    You can also implement a kind of VPD on the cheap by using user defined namespaces and the SYS_CONTEXT function, combined with application logic and clever view definitions.
    HTH
    Regards Nigel

  • Oracle Portal w/ Multiple Schemas

    I posted this in the Architecture forums, but it looks like this forum may be better or yield more results for what I'm looking for.
    We are just about to launch a Portal initiatve and are looking for best practices for implementing a single instance of Oracle Portal that interacts with multiple schemas. Has anyone here done this or know where I can find this type of info? I have a few questions about how this works, how scalable it is, how security is handled, yada yada yada. --Kind Regards, Derek.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi jlubbers. Thanks for your reply.
    After some additional disucssions with our DBAs, I think I may have left a misleading post in respect to schemas. Our company acts as an application service provider to some degree. The way the databases are setup, each of our client agencies have their data stored completely separately from other agencies. The table structures are almost exactly identical (and can be considered identical for the scope of this discussion) and will never be merged together.
    We want to leverage Oracle Portal as much as we can while also getting as much reuse as we can. Each time we get data from the database, we want the datasource to be dynamic based on the usergroup.
    One constraint that we have is that the physical database connection must be connected as the user that's logged into the portal, so I think we have to do some type of User Proxy, but we're not 100% sure how to do that and what that means for all of our java applications.
    I'll check out your other posts and see if there is anything in there that may help. Thanks for taking the time. --Derek                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for