JAXB : case insensitive attributes

I frequently receive an XML file which I do not have control over. ( It is generated outside of my organization)
I derived a XML schema by analyzing the document structure and used the schema to generate a set of JAXB generated classes.
Nevertheless, the file sometimes comes with some minor "mistakes" in the attributes names of some entities by having the wrong uppercase or lowercase. (Vgr. myAttributeName vs myAttributeNAme )
Is there any way to tell JAXB to be case insenstive on the attribute names ?
Unmarshalling the file fails at the attribute with the wrong case.
Thanks.

Unlikely. XML itself defines all element and attribute names to be case-sensitive, and likewise Java defines class and variable names to be case-sensitive. So it wouldn't make sense for JAXB to have a "case-insensitive" option.
If you can't get the supplier to provide the correct information in the XML file (e.g. they are an important customer and you can't point out to them that they are a bunch of donkeys) then you could pre-process the XML file yourself to correct the errors.

Similar Messages

  • JAXB case insensitive

    Dear friends,
    is there a way to read a XML using JAXB in a case-insensitive way ?
    i.e., I have a XML from a legacy software, all ugly Upper Case written. And I'm creating a schema to represent the data from this xml.. I was dreaming to write the schema fulfilled with java-like elements, i.e., lower cases..
    is there a way to read an "UPPER CASE" xml in a set of Java classes - from a schema with regular names ?
    best regards,
    Felipe Ga�cho

    Some of us end up having to maintain FORTRAN for a living, so count yourself lucky (I've since left that job). Code so old you have to shout for the compiler to here you.
    You could always write a little XSLT than uppercases all the names in your schema.

  • Custom tag attribute case insensitive??

    We ran in to an interesting "feature" of custom tags: The attributes in the
              tags seem to be case insensitive.
              For example, if you play with the "tagext/quote" example provided with the
              WebLogic server installation, you can change the line in showcode.jsp to be
              like:
              <quote:code quoteColor="blue" COMMENTCOLOR="purple"
              defaultFont="face=Helvetica color=gray">
              and the generated java servlet code will still call the "setCommentColor()"
              method in the CodeTag class. Almost like it searches for a matching
              "attribute" in the .tld file and uses it. If you put multiple entries in
              the .tld file for different cases, it still picks the first one it finds and
              ignores the case differences.
              The J2EE/JSP spec indicates that custom tags are case sensitive, I assumed
              that is supposed to include their attributes.
              It bit us because we want to have attributes which differ by case only
              (don't ask).
              -Greg
              Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • Case insensitive search in select statement

    Hi Experts,
      I have entries in table as mixed case. For example i am searching on an attribute called description in the table. I want the serch to be case insensitive for that attribute. Because in table it is i.e. JUMBO Pack and in the search attribute it is i.e. Jumbo Pack.
    I do not want to translate both to the same case and search. Is there an option?
    Best Regards!
    Sandip

    Hi Sandip,
    One more alternative:
    If ztext is ur original field which is saving the mixed text.
    Append one extra field(ztext_upper) to the table.
    Now if " Sap Sdn" is the text we are saving then
    While saving the entires to the table,
    1. asusual save the value(" Sap Sdn") to teh original field(ztext)
    2. translate the value to upper case(SAP SDN) and save this entry to teh newly appended field(ztext_upper)
    Now while doing search, translate to upper case and compare with the value in ztext_upper. If it satisfies then for display options select the original value from the field (ztext) which is corresponding to the satisfied ztext_upper field.
    Regards,
    Swarna Munukoti.

  • Case insensitive search on subject name to retrieve a certificate from key chain.

    Hi,
    I need to find the client certificate from key chain based on the subject name.
    Currently, I am using attribute kSecLabelItemAttr and providing the subject name to create the attribute list for the API "SecKeychainSearchCreateFromAttributes" which gives the certificate.
    Problem: This certificate search is case sensitive for the subject name.
    Question: Is there a way to do a case insensitive search on a subject name to get a certificate on snow leopard? I found the attribute "kSecMatchCaseInsensitive" which works with key "kSecClassCertificate" in the API "SecItemCopyMatching", but the key kSecClassCertificate is only available for 10.7 and later.
    https://developer.apple.com/library/mac/#documentation/Security/Reference/keycha inservices/Reference/reference.html#//apple_ref/doc/uid/TP30000898-CH4g-SW7
    Any help is highly appreciated.
    Thanks!

    I think there is issue with your logon trigger :
    "IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN"
    it should be :
    IF UPPER(USER) = 'MYAPPUSER' OR UPPER(USER) = 'MYAPPREPORTINGUSER' THEN
    because user name stored in Upper case. Check and try.
    HTH
    Girish Sharma

  • Case insensitive in-memory search

    I'm trying to create a case-insensitive in-memory search on a ViewObject. I'm using the following code for performing an in-memory search (~ filtering already retrieved rows from the ViewObject which is based on a webservice)
    ViewObject vo = service.getMyViewObject();
    vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
    ViewCriteria vc = vo.createViewCriteria();
    vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    vcr.setAttribute("MyAttribute", "like 'abc%' ");
    vc.add(vcr);
    vo.applyViewCriteria(vc);
    vo.executeQuery();This all works well .. but when I add vcr.setUpperColumns(true); and change line vcr.setAttribute("MyAttribute", "like 'abc%' "); into vcr.setAttribute("MyAttribute", "like 'ABC%' ");I get the following exception :
    Caused by: oracle.jbo.expr.JIException: Method call has no object context
         at oracle.jbo.expr.JIParserMethodNode.evaluate(JIParserMethodNode.java:71)
         at oracle.jbo.expr.JIParserNode.evaluate(JIParserNode.java:740)
         at oracle.jbo.RowMatch.rowQualifies(RowMatch.java:230)
         at oracle.jbo.server.ViewObjectImpl.rowQualifies(ViewObjectImpl.java:1387)
         at oracle.jbo.server.QueryCollection.rowQualifies(QueryCollection.java:2308)
         at oracle.jbo.server.QueryCollection.removeUnqualifiedRows(QueryCollection.java:549)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:719)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)So, my question is: is it possible to do a case-insensitive in-memory search or should I convince my customer to drop the feature-request ;-)

    Maybe I should add some extra info:
    The viewobject is based on a webservice and not a database. I do not have access to the implementation of that webservice ( I only consume its data and store the results in the viewobject's datacollection ). The VO has no query attached and only has transient attributes. Therefore, I cannot use vo.setWhereClause() ~ I think.
    Once I filled the viewobject's datacollection ( by overriding executeQueryForCollection() and createRowFromResultSet(...) ), I would like to filter the datacollection with filterparameters (from my jsf page). This can be enabled by first calling vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS) an
    The in-memory search facility in the ViewObject's implementation seems to be restricted in filtering the viewobject's datacollection.
    I've tried using ViewCriteria and RowMatch to filter the data ... with no success.
    I hope I have explained my situation a bit more. Perhaps someone can help me out ?

  • Case insensitive highlighting

    I have a report region with a search field. I am using the builtin highlight feature, which works as expected. But what I like to achieve is to highlight all occurences of my specified search word regardless of its case!
    That means if I search for example for
    "joe"
    I'd like
    JOE,Joe,JoE, etc
    to be highlighted as well.
    Is there any way to accomplish this?
    Regards, Michael

    Thanks Vikas for your time answering.
    But in my scenario it is still not working as I wish. This is due to the fact that I actually use the procedure wwv_flow_disp_page_plugs.display_report for grabbing the output of a report region with which I replace a DIV element.
    I know that wwv_flow_disp_page_plugs.display_report is undocumented and unsupported, but ...what the heck ....it works like a charm, except well ..eh ... for case insensitive highlighting ;)
    So the procedure is as follows:
    1) create a text item
    2) create a report region with condition "DISPLAY NEVER" and fill all required attributes including highlight. Grab the region_id from the source!
    3) create an application process with above mentioned procedure wwv_flow_disp_page_plugs.display_report and parametrize it with your region_id
    4) create a html region with a DIV element and some javascript code with htmldb_get to call the application process and replace the DIV with the result from htmldb_get
    Unfortunately I can't demonstrate the steps on apex.com because one needs a grant on wwv_flow_disp_page_plugs.display_report to make it work!
    The reason for going this way is the enormous amount of flexibility in layouting and styling your whole webpage, while still being very perfomant managing your "plugs" AJAX-like.
    So to come back to my original question, either I made some mistake somewhere or wwv_flow_disp_page_plugs.display_report does not the full highlighting story.
    Maybe there is even an supported API which accopmlishes the same thing: grabbing only the report regions output (which only is a HTML Table at the end of the day)?
    I know of How to display region from one page on the other page?
    but Page 0 is not an option since again I cannot grab solely a reports output :(
    any help, comments are really appreciated
    Michael

  • Case insensitive searching in Interactive Page

    Hi all,
    I am currently working on the interactive report, and wondering is it possible to perform case insensitive search for the data in the textbox besides the magnifying class.
    By the default, the system uses "=" for searching. I tried the searching option using "contains", and it would be able to search the content in uppercase and lower case scenario. Is it possible to make "contains" as the default?
    Thanks,
    Thomas.

    By the default, the system uses "=" for searching.I get "Row text contains..." as the filter when entering text directly into the default search box. Perhaps you are working with a saved report?
    There's a way to make all IR comparisons case insensitive. See this <a ref="http://apex.oracle.com/pls/otn/f?p=34839:18">example of case/accent insensitive search</a> on a standard report.
    That code can't be put in a Before Regions process as described to work with IRs as page processes are not executed by the AJAX call that refreshes the report. However, IR refreshes do run the Virtual Private Database PL/SQL call defined in the application security attributes, so putting the NLS modification code there will work.
    Go to Application > Shared Components > Edit Security Attribute | Virtual Private Database (VPD), and make the call from there. Due to the specific requirements of the code that has to be called from here when used for security purposes, this is probably best done by setting this up to make separate calls to packages defined outside APEX, one to handle any actual VPD and other security-related details, and others to orchestrate any other code that has to be run. (For example, in this case it may not be desired to alter the NLS environment on every page, so the program could take a parameter specifying the current page and apply the ALTER SESSION conditionally on this.)

  • Search * from t where a like b case-insensitive ?

    I have a Database-field (CHAR60) that contains text with upper and lower case letters. In my application, the user can search for entries in the DB table using this field, which leads to an SQL statement like this:
    SELECT * FROM table WHERE field LIKE pattern INTO...
    My question:
    If I search for "abc", i won't find entries with "aBc". Can I do a case-insensitive search with SELECT and LIKE?

    Hello Daniel,
    What is the domain(CHAR60) for the field that you are searching for?
    The domain has an attribute called <i>Lowercase</i>, and it is my understanding that so long as this is checked, the data will be stored in the database exactly like it was entered on the screen (case-sensitive).
    If thst is the case with your domain, then I guess you would have to make do with something like:
    SELECT *
      FROM table.
      TRANSLATE : TABLE-FIELD TO UPPERCASE,
                  PATTERN TO UPPERCASE.
      IF TABLE-FIELD CS PATTERN.
    *    Do your processing here...or fill the internal table
      ENDIF.       
    ENDSELECT.
    I know this code has been a bit crude, but this is the essence.
    Regards,
    Anand Mandalika.

  • Possible to do case-insensitive searches?

    G'day,
    I was wondering if it's possible to do case-insensitive searches in oracle/HTMLDB?
    I've tried what I thought would work
    "select * from application where name like '%microsoft%'", this unfortunately doesn't return any records with a capital in it(eg "Microsoft").
    If there is no way to do case-insensitive searches what is the best way around it?
    Thanks
    -Colin

    Colin,
    Yes it is possible to do case insensitive searches using SQL. Try, for example:
    select * from application where upper(name) like '%ORACLE%'
    The trick is to upper() both sides of the like operator.
    Sergio

  • Error in a report after enabling case insensitive search in conn pool prop

    Hi All,
    I put the below code in connection pool's connection string to enable case insensitive search.
    alter session set NLS_SORT=BINARY_CI
    alter session set NLS_COMP=LINGUISTIC
    After putting this code one of my report started giving the below error which was working fine otherwise.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. NQODBC SQL_STATE: HY000 nQSError: 10058 A general error has occurred. nQSError: 16001 ODBC error state: S1000 code: 1791 message: OracleODBCOraORA-01791: not a SELECTed expression. nQSError: 16001 ODBC error state: S1000 code: 1791 message: OracleODBCOraORA-01791: not a SELECTed expression. nQSError: 16015 SQL statement execution failed. (HY000)
    The report gives error for the below divide condition when I select a column from a different dimension (eg: region)
    COUNT(DISTINCT RMA.RMA)/COUNT(DISTINCT User."User Name")
    Can anyone please throw a light why this is happening.

    Below is the SQL which is throwing error in OBIEE. It was working fine when I tried running it in toad:
    select T1609.ATTRIB_05 as c1,
    count(distinct T1609.ATTRIB_42) as c2,
    TRUNC(T1159.FSCL_WEEK_START_DT) as c3
    from
    WC_DAY_D T1159 /* RMA_RECEIVED_DT(WC_DAY_D) */ ,
    WC_RMA_D T571,
    WC_FV_FA_D T1609,
    WC_FV_FA_F T1679
    where ( T571.ROW_WID = T1679.RMA_WID and T1159.ROW_WID = T1679.RMA_RECEIVED_WID and T1609.ROW_WID = T1679.FV_FA_WID and T1609.ATTRIB_39 <> 'FV' and (T571.STATUS_CD in ('2nd FA', '2nd FA Review', 'Closed')) and TRUNC(T1609.TODO_ACTL_END_DT) is not null and TRUNC(T1159.FSCL_WEEK_START_DT) between TIMESTAMP '2009-03-22 00:00:00' and TIMESTAMP '2009-04-12 00:00:00' )
    group by T1609.ATTRIB_05, TRUNC(T1159.FSCL_WEEK_START_DT)
    order by c3
    -------------------- Query Status: Query Failed: [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression.
    [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression.
    [nQSError: 16015] SQL statement execution failed.

  • How to change Database server is case-insensitive setting at runtime

    Is there a way to change any of the properties in Report Options > General Settings at runtime. Mainly the [Database server is case-insensitive] and [Perform grouping on server] settings. We are using the Crystal .Net X1 runtimes (11.5.9707.811). I have sesrched the forums with no luck so thought I'd try my luck here. Thankyou for your time.

    Hi Simon,
    Sorry, search for the function using the Object Browser in .NET. If you have Crsytal Reports XI R2 (11.5.x.xxxx) then you have it. Unless it's not a developer version. In whcih case you need to upgrade.
    If you do have the Developer version then simply add the RAS assemblies to your project. Look in our samples above for more info on h ow to use RAS.
    If you don't have the Developer version then your only options are to upgrade or manually change the report settings in the Designer.
    Thank you
    Don

  • How do I move my large iTunes collection from a case-sensitive hard drive to a case-insensitive hard drive?

    I currently keep my iTunes media on an external hard drive because it takes up too much space on my machine. I recently discovered that it was formatted as case-sensitive when I bought it, and now months later I'm having issues. When attempting to back up my files on a case-insensitive hard drive, the operation failed due to conflicting file/folder names (Artist and artist are now considered the same file name and one would have to overwrite the other). I now have a large iTunes file collection that is stuck on the case-sensitive hard drive, and I want to save a backup on a case-insensitive drive. 
    Is there a way to identify all cases where multiple files/folders have the same title/album/artist but different spelling so there will be no conflicts? The folder/file names would have to be crossed referenced to highlight any cases where File/fiLe/file  would cause a problem.
    I imagine there is a way to do this using iTunes script or Automator  or a command in terminal or something rather than going through and checking/fixing all the information for thousands of songs by hand. I'm at the limits of my minimal development skills, so any help would be appreciated.

    You should be able to use either "Carbon Copy Cloner" or "SuperDuper" (free for this purpose) to copy your case-sensitive volume to an empty case-insensitive one. Make at least two such copies on different drives. One is not enough to be safe.
    If there are any name conflicts—that is, files in the same folder with names that differ only in case, such as "File" and "file"—then you will either get an error or one of the files won't be copied. You must ensure either that no such conflicts exist, or that the consequences are not important. How you do that is up to you. Unless you went out of your way to create conflicts, they probably don't exist.
    Then erase the source volume in Disk Utility as case-insensitive. This action will remove all data from the volume.
    Restore from one of your backups using the same application you used to create it, or use the "Restore" feature of Disk Utility, which will be faster. Search its built-in help for the term "duplicate" if you need instructions.

  • Time Machine says both of my external hard drives require reformatting to case insensitive. What do I do?

    I have been successfuly using Time Machine to back my iMac  to an external hard drive (via usb) and everything has been fine for the last year. I have been using TM to back up to a HD called Terra LaCie via usb.
    A week ago, my iMac hard drive was full--so I spulrged and bought a 6 TB external hard drive (Western Digital My Book-Thunderbolt). I set up the new Thunderbold HD to use RAID 1 (mirror) and copied most of my iMac hard drive over to the Thunderbolt HD.
    I kept my working photographs (most recent) on my iMac and felt good to know my older photographs are on my new Thunderbolt hard drive.
    For a few days, Time Machine seemed to work fine (backing up my iMac to Terra LaCie HD. I haven't been concerned with backing up the Thunderbolt drive (as I feel that mirroring is same as backing up).
    Yesterday, Time Machine indicated the lastest back-up failed (for the HD called Terra LaCie). Now, when I go into Time Machine, the dialog box indicates the following message:
    "Are you sure you want to erase the backup disk “Terra Lacie”? Erasing will destroy all information on the disk and can’t be undone.
    The disk must be erased before it can be used for Time Machine backups because a disk you are backing up is case sensitive, but the backup disk is not."
    When I open Time Machine to look at my external hard drives (I also have a third usb portable drive); two of the three drives indicate the following:
    "reformat required; case insensitive disk".
    The small, portable hard drive (that I'm also using) doesn't say it needs to be reformated (but my new Thunderbolt and my old usb HD both indicate the same message (above).
    What should I do? I just spent days transferring my photographs from my iMac to my new Thunderbolt. Should I just not use Time Machine any longer and work from my Thunderbolt drive?
    Am I to understand that my iMac suddenly become case sensitive? Sorry if this was too much information about my hard-ware set-up.
    Any help someone can provide me would be greatly appreciated. I suppose I need to understand Time Machine and perhaps my Thunderbolt better.

    Hi BDAqua,
    Bravo, you helped me solve my problem.
    The Case Sensitive Disk was the small portable hard drive that I was using termporarily.
    I just disconnected it and I started TM machine and everything seems to be working just fine.
    Thank you very much!!!!

  • How do I convert a case sensitive drive to a case insensitive drive?

    I have recently purchased a MacMini Server, and installed the 2 internal hard drives in a RAID 0 configuration to obtain the speed and 1 TB capacity, but unfortunately (rather stupidly in retrospect) formatted the drive in case sensitive mode.
    On installing the operating system and multiple applications, everything seemed to work well until I tried to install Adobe Acrobat X Pro. This application refuses to install on a case sensitive formatted drive, which I now understand is a common problem.
    The question is how can I convert to a case insensitive format without reinstalling all of the software from scratch?
    I have a Time Machine backup, and the easiest thing for me would be to reformat the drive, and then restore from the Time Machine backup.
    Will this process work? Or will there be some complications and files that will not function if they were originally installed on a case sensitive drive?
    Any help is appreciated....

    iPartition can do it ( http://www.coriolis-systems.com/iPartition.php ).
    from iPartition Help:
    Make Case Sensitive/Case Insensitive
    HFS+ now supports a case sensitive format as well as the usual case insensitive format. On a case sensitive volume, the names “Readme”, “README” and “ReadMe” would all represent different files, even if they were in the same folder.
    This option allows you to non-destructively change a case sensitive volume into a case insensitive one, and vice-versa. If you are going from a case sensitive volume to a case insensitive volume, some of your files may be renamed automatically by iPartition so that they do not clash. If all of the files in the table below were in the same directory, the right hand column shows the new names iPartition would choose for them:
    Old name New name
    README.txt README.txt
    ReadMe.txt ReadMe 1.txt
    Readme.txt Readme 2.txt
    README README
    ReadMe ReadMe 1
    Readme Readme 2
    Notice that iPartition puts the number before any file extension.
    N.B. iPartition does not transform filenames with numbers on the end back into their original forms. There is no way to tell which files were renamed by the user and which were renamed by the conversion process.

Maybe you are looking for

  • Need to read text from FM 'BBP_PD_CONF_GETDETAIL' in a single line of ALV output

    s Hello Gurus,          I have to read the attached text in which TDID and TDLINE need to read.Here i need to write logic like that in ALV output text of TDLINE related to TDID Htxt come in single line if there is more than 1 line used , same for NOT

  • Path selection convention

    I would like to know why Adobe changed the "load path as selection" convention in Adobe photoshop:  In the older versions, the load selection from path would only select INSIDE the chosen path but with (possibly CS4), CS5, CS6, CC it would appear tha

  • Java applet and vertical scroll bar

    Hi, We are upgrading from SRM 3.0 to 5.0 and are encountering these 2 issues: 1- When clicking on approval preview users get a Java pop up box titled "request authentication", the warning message is: Identification Required. Please select certificate

  • Java.lang.ClassNotFoundException: oracle.forms.engine.Main

    I got this error when opening my forms, in java console, it says the frmall.jar file cannot be downloaded. I tried to get access the file with http://192.168.3.44:9001/forms/java/frmall.jar  ,  it displays 404 page not found. I think the virtual path

  • Configuration tool issue with new release

            With this new release - September 2013 - We have found that when doing find products (as opposed to enter sku) the option to add seems to work -  it gives a message that its added. But when returning to config the SKU has not been added.  Its