Restriction and the Fixed attribute and JAXB

Hi
I have what I believe is a valid XSD, with two complex types BaseType and OtherType. What I want is for BaseType (abstract) to have an attribute but no fixed value for it. OtherType would restrict the allowable values to just "Test". I have checked the XSD with xmlspy and the W3C site.
so happy with the xsd I try to use JAXB to generate classes:
xjc.bat -p com.me.test example.xsd -d gen
but I get :
[ERROR] derivation-ok-restriction.2.1.1: Error for type 'OtherType'. An attibute use in this type has a REQUIRED setting which is inconsistent with a matching attribute use in the base type.
(removing the Fixed attribute solves it but I'd like to keep it)
Any ideas?
Thanks
Des Field Corbett
XSD Follows:
================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="BaseType" abstract="true">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="OtherType">
<xs:complexContent>
<xs:restriction base="BaseType">
<xs:attribute name="name" fixed="Test"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="root" type="OtherType"></xs:element>
</xs:schema>

Got it to work...
My XSD had the line in BaseTypes:
<xs:attribute name="name" type="xs:string" use="required"/>
and the line in OtherTypes:
<xs:attribute name="name" fixed="Test"/>
Changing this to:
<xs:attribute name="name" type="xs:string" use="required" fixed="Test"/>
Got it to work.
Not sure if this is a Bug in JAXB or its just being fussy... Sure going to make it a pain to hand code in the extra tags in to my real life XSD!
If there is a better way I'd be grateful to know....
Thanks
Des
BTW getting a java.lang.reflect.InvocationTargetException now - but as I'm just learning JAXB so I'm guessing thats something else.

Similar Messages

  • HELP with restrictions AND the passcode 'turn off' option won't appear. How do I fix both problems?

    Hi,
    Since updating to the iOS 7.0.2 I have lost the ability to turn off the passcode lock. I put in my passcode and usually the "turn off" option would be available and I reenter my password a couple of time and I can turn it off. It doesn't even give me that option now. The feature is inaccessible. The Simple passcode option is not available either. I like to turn off the passcode lock when I'm at home because I find entering my passcode all the time when I'm at home quite annoying. I also noticed that it says the restrictions are 'on' and I have no idea how they were turned on and have no idea how to turn it off. I don't even know what the restrictions do. I tried typing in what I thought was the password and now have 4 failed attempts. I'm afraid I'm going to get locked out of my phone.
    Do I have to reset my phone? Will that even work? What happened and what do I need to do to fix it? HELP!

    The Restriction issues should be separate from the Passcode issue. If you cannot remember the Restrictions passcode, the only option is to restore the phone as new, and not use a backup. The Restrictions passcode is contained in the backup.
    The Passcode issue. Is this Exchange account from work? If so, the Exchange administrator would be someone from the IT department. They can require a mandatory passcode on the device. It could very well be something from your username/password at work, but they should have advised you of that. Try turning the Exchange account off and then do a reset on the phone. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. After the phone restarts, see if you get access to the passcode settings. If so, then it is the Exchange account. You can turn it back on after that, but you will need to get information from the Exchange administrator. They could possibly be able to change Restrictions, so I would ask about that as well. If you cannot get a Restrictions passcode, as I said earlier, the only choice is to restore the phone as new, and then you would have to sync your content back individually.

  • Check Required Elements and Attributes in JAXB

    Hi
    I need check required elements and attributes in JAXB java classes , if there are any value for them place it , otherwise place default value in xml file , because of it I upgrade JAXB2.0 to JAXB 2.1 to support "required" in "XmlElement" , I read in "JavaWS(JAXB)Tutorial.pdf" that JAXB itself check required elements and attributes , if there are any value for them place it , otherwise place default value in xml file , the exact part of document is :
    << A property is said to have a set value if that value was assigned to it during unmarshalling or by invoking its mutation method. The value of a property is
    its set value, if defined; otherwise, it is the property’s schema specified default value, if any; otherwise, it is the default initial value for the property’s base type as it would be assigned for an uninitialized field within a Java class. >>
    I want to know , dose JAXB do this task ? (now I work with JAXB2.1 but it doesnt do this task.Maybe I must set some configuration)
    and if JAXB doesnt do it , how I can check required elements and attributes in JAXB ?
    Please help me.
    Shariat

    its all on Apple's Developer site
    http://developer.apple.com/DOCUMENTATION/AppleApplications/Reference/FinalCutPro _XML/index.html

  • HT4009 I cant do an in app purchase, I taken care of the restrictions reloded the game and I still get the message to see itunes suport and canot conet to itunes.

    I cant perform an in app purchase, I fixed the restrictions and reloded the game but still I get the message to contact itunes suport and canot conet to itunes, I have wifi and it is working fine, the game is clash of clans.

    If you are getting a message to contact iTunes Support then you can do so via this link and ask them why the message is appearing (these are user-to-user forums, we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • The fixed value date is empty and not displayed in the VA05 report

    Hi SD Gurus,
    With in the Sales Order in the line item level in the billing tab we have the fixed value date (VBKD - VALDT) were entered. 
    But when we try to execute the report VA05 were the fixed value date column shows empty (i.e without the date it shows the blank).  Can you any one help me with regard.
    We would like to fix this problem.
    Thanks in advance for providing solution to this query.
    Thanks and Regards,
    SAP-SD group

    Hi janarthanam,
    Ok.
    Goto t-code SQVI,SAP Quickviewer.
    Give a name to your query and enter description ,etc.
    Next enter the table from which you want to fetch data,ie,VBKD .
    Select "Layout mode" for displaying data on the SAP screen or "Basis mode " if you want to extract the data to a word doc,excelsheet or a flat file.
    Next you can select the fields you want to display into your report,their position and ascending/descending order,Here make sure u select
    the field u need to display ie. the fixed value date ( VALDT) .
    also select the fields u wish to have in the selection criteria.
    Enter these required information and u would get a report on the SAP screen or in your desired format.
    Hope it will suffice you.
    For any queries ,your are welcomed.
    Thanks,
    Umesh.

  • HT201304 It would be tremendously helpful to be able to access, set restrictions, and make changes from the parents device to all devices under the same iTunes account, so that I could make changes to my kids devices without physical access.

    Please help!
    It would be tremendously helpful to be able to access, set restrictions, and make changes from the parents device, to all devices under the same iTunes account, so that I could make changes to my kids devices without physical access.
    I understand that I can set up a different Apple ID for the kids devices, or take physical control of the device and make the changes myself. However, my teenage son is technically savvy enough to have a job in Silicon Valley, as are most young people these days. However, in order to access his devices the current way, I first have to bypass the four digit pass code. This starts a fight of why I need in the device and continues to escalate. The argument that I am the parent will gain access but the fight is simply exhausting, and quite frankly shouldn't have to happen at all. He is not yet an adult, he did not pay for his iPad or iPhone and I, as a parent, should have not only have the right to change options at will, and from anywhere, but look at history or current activity when I feel like it.
    I currently have the settings where app and in-app purchases require my password to be put in, and he must come to me to type it in, but I need more control and would like, and should be able to access any of our six devices and make individual changes simply by logging in to my account, with my password.
    If I can see all my devices on the "Lost My iPhone" app, this technology should be easy to make happen.
    C'mon parents! I have a pretty good kid, given all things that they can get into, but I am not stupid. For everything I see has been done, there is much more I haven't seen. I want my children to be kept safe and be able to know what they are looking at or listening to. We parents are the only ones who know our beliefs and what our kids can handle and when.
    Thanks for any support or information that I may be missing in order to fulfill my request.

    There are mobile device management solutions that can do this, including in Apple's OS X Server system, but most parents generally find that setting this up is more work than it's worth. If you're interested, though, there are a couple that at least purport to be free (I don't know if there are any hidden "gotchas"):
    http://www.unwireddevicelink.com/features/
    https://meraki.cisco.com/products/systems-manager
    and Apple's system:
    http://www.apple.com/osx/server/features/#profile-manager
    I don't think any, however, allow you to see current activity or browser history. iOS doesn't expose those to access from MDM solutions, to the best of my knowledge.
    Regards.

  • This is the fix for "iTunes has encountered a problem and needs to close .

    I recently purchased a new laptop and tried to get my library transferred. iTunes wouldn’t open; QuickTime wouldn’t open. I was near a heart attack. I tried the fixes listed in the forum, but they didn’t work. Then I discovered:
    The fix needs to be done in a proper order!
    a. Delete iTunes and QuickTime from Add/Remove programs
    b. Go to C > Program files an delete the folders for iTunes and QuickTime. If QT will not allow you to delete the program because it’s “in use”, then go to Start > Run > configsys > Startup and deselect “qttask”. You will have to reboot and get past the selective start up/diagnostic screen. Then go back to C > Program files and you will now be able to delete the QuickTime folder.
    c. For good order’s sake, delete any desktop shortcuts and empty your Recycle Bin.
    d. Reboot
    e. Download the STAND ALONE version of QuickTime: http://www.apple.com/quicktime/download/standalone.html
    f. Install the stand alone version; reboot. At this time, when the diagnostic window comes up, you can reselect “qttask”
    g. Download the QuickTime 7 with iTunes 6: http://www.apple.com/quicktime/download/win.html
    h. Install the iTunes program. The stand alone will take precedence over the imbedded version of QuickTime.
    i. Reboot
    When your system has completed the reboot, you should be able to double-click the newly installed desktop shortcut; give it a few minutes and it should open. Mine did – and I tried everything else. If this does NOT work, then there is a conflict with something else in your system and you will have to go through the configsys elimination process, which is a whole lot more work.
    Best of luck!

    Generate another of those error messages and click the "Click here" link in the error message box. What modname and modver are showing for the error? (Precise spelling please.)
    If the error is a BEX and thus doesn't show an modname or modver, let us know what P1 through P9 items are showing for you instead.

  • After upgrading to IOS 5 on my iPad only some books in iBooks show content. They were fine before the upgrade. I made a new version in Pages and reinstalled them on the iPad. Still nothing. What is the fix?

    After upgrading to IOS 5 on my iPad only some books in iBooks show content. They were fine before the upgrade. I made a new version of the book in Pages and reinstalled them on the iPad. Still nothing. What is the fix?

    I just got the iBooks update and that fixed the problem, except the book covers look like they were done in a government printing office.

  • When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page.

    When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page. I don't want to have to check off an additional 5 or 6 attributes each time I print out contact information. Is there a way to change the default setting for printing lists, so it is not just "phone," "photo," and "job title?"

    I have a user who wants to do this same thing. I did not find any way either to default the attributes to anything other than what you see the first time. Seems like such a trivial thing, hard to believe they do not allow it. I did find a program for this called iDress but I can't seem to download it from any links on the Internet. Not sure if it is free or not, but it was recommended by a link on the Mac support site.

  • How do I use Get-ADUser to get just the Managers attribute? And then get rid of duplicates in my array/hash table?

    Hello,
          I am trying to just get the Managers of my users in Active Directory. I have gotten it down to the user and their manager, but I don't need the user. Here is my code so far:
    Get-ADUser-filter*-searchbase"OU=REDACTED,
    OU=Enterprise Users, DC=REDACTED, DC=REDACTED"-PropertiesManager|SelectName,@{N='Manager';E={(Get-ADUser$_.Manager).Name}}
    |export-csvc:\managers.csv-append 
    Also, I need to get rid of the duplicate values in my hash table. I tried playing around with -sort unique, but couldn't find a place it would work. Any help would be awesome.
    Thanks,
    Matt

    I would caution that, although it is not likely, managers can also be contact, group, or computer objects. If this is possible in your situation, use Get-ADObject in place of Get-ADUser inside the curly braces.
    Also, if you only want users that have a manager assigned, you can use -LDAPFilter "(manager=*)" in the first Get-ADUser.
    Finally, if you want all users that have been assigned the manager for at least one user, you can use:
    Get-ADUser
    -LDAPFilter "(directReports=*)" |
    Select @{N='Manager';E={ (Get-ADUser
    $_.sAMAccountName).Name }}
    -Unique | Sort Manager |
    Export-Csv .\managerList.csv -NoTypeInformation
    This works because when you assign the manager attribute of a user, this assigns the user to the directReports attribute of the manager. The directReports atttribute is multi-valued (an array in essence).
    Again, if managers can be groups or some other class of object (not likely), then use Get-ADObect throughout and identify by distinguishedName instead of sAMAccountName (since contacts don't have sAMAccountName).
    Richard Mueller - MVP Directory Services

  • Downloaded IOS 7.1 and now can't access Game Center or friends list in the games I play on ipad.  What is the fix?

    I downloaded IOS 7.1 on my ipad.  Now I can't open Game Center or access my friends lists in the games I play.  My ipad is about 3 years old.  What is the fix?

    Swiping up from the bottom of the screen with four fingers did not bring up the app preview. A single press on the home button still brings me back to the home screen, but a double press of the home button does nothing following updating to 7.1   Given that, when I added a software home button as suggested by DIAVONEX, I found that all of the apps WERE still open! So thank you DIAVONEX, and you should be careful, bobseufert, as your information was inaccurate.( I did try turning it off and that didn't change anything. ) I don't really want a software home button on my screen, but I guess I will use it until either there is another update to resolve this glitch or someone else identifies a quirky setting that I inadvertently activated...

  • I have an older iPod Touch, Model MC086LL with an IOS software version of 4.2.1.  Many of the applictions which I had previously purchased were recently upgraded and they no longer can be loaded on my iPod.  What is the fix?

    I have an older iPod Touch, Model MC086LL with an IOS software version of 4.2.1.  Many of the applictions which I had previously purchased were recently upgraded and they no longer can be loaded on my iPod.  What is the fix?

    Reload older versions from iTunes on a computer, or buy a newer device.
    (73016)

  • I downloaded iOS 5 and then I found my Apps were missing. So then I looked it up on the web then found the fix. The only problem is that half the apps I downloaded are gone. One of my favorite, Angry Birds, which I bought is also gone.

    I need help! I downloaded iOS 5 on my iPod 3rd generation after backing EVERYTHIGN up 4 times and I think I might have synced it. But just forget that I synced anything. So then when I tried to Restore Back-up it DID NOT work. This was my first time using iTunes, and I ALWAYS download throught the APP store. So then I found the fix online. I actually found 3 different ways:
    A). Go to the App store and then go to 'UPDATES' then go to Purchased and download everything you need.
    - This didn't work for halfmy apps.
    B). Go to the iTunes store, go to File > Sync iPod then wait a LOOOOOOOOONG time.
    - This also did not work, and not just in the case of my missing apps, all my apps were just sitting there. Nothing happened. I deemed this as USELESS.
    C). I have a premonition that this option should work, but I can't find it. I have to go to the SUMMARY tab under device settings then click restore. The onlyproblem is, I CAN'T FIND IT! It probably should work.
    BOTTOM LINE: Some of my favorite Apps such as Angy Birds and Madden NFL '11 are now gone. I have no idea what happened. And my backed-up iPod on iTunes only has like 14 apps out of 100sof Apps.
    PLEASE HELP - SLL ANSWERS GET 5 POINTS

    Have you looked on all the pages of your iPod?  Have you looked in all your folders?  Have you you tried finding the apps using the iPod's search page.
    PS: Offering points in advance is a violation of there terms of service for this forum.  Perhaps it's why you have not received any other answers so far,

  • What do i have to do if in my ipod i have locked restrictions and i want to unlocke it but i dont know the password.

    what do i have to do if in my ipod i have locked restrictions and i want to unlocke it but i dont know the password.

    You will have to restore as new

  • Songs in music library downloaded from a CD and synced to my old IPOD are not recognized by my new IPOD classic.  What is the fix?

    Songs in music library downloaded from a CD and synced to my old IPOD are not recognized by my new IPOD classic.  What is the fix?

    If you are using automatic syncing with your old iPod, select that iPod in iTunes and go to its Music tab (next to Summary).  Note how this Music tab is set up.  Maybe you can do a screen shot.
    Now, select the new iPod in iTunes.  Go to its Music tab, like you did for the old iPod.  Set up the new iPod's Music tab exactly like the old iPod, and Apply the change. 
    The music on your new iPod should now match the old iPod.

Maybe you are looking for