Jaxb 2 customization issue

I am new to JAXB2 world.
-I have a xml document whose xsd has imports of other xsds. I have the corresponding domain model and java objects in hand. The names of the classes/attibutes differ from that of those specified in the xsd; Thus did the jaxb 2.0 customization. JAXB is throwing a nullpointer exception when it encounters the import of other xsd in the calling xsd but works well, otherwise.
-In the case of complicated java domain models and xml bining, would the usuage of Jibx be preferable over Jaxb...any suggestions?!
-Also please suggest a good book/articles about java domain and xml binding.
Any help is highly appreciated.
Thanks in advance.

Hello,
For complicated models, or for situations in which you want to map an existing object model to an existing XML schema you need a tool that goes beyond JAXB.
I am the team lead for Oracle TopLink Object-to-XML (JAXB) and was a member of the JAXB 2.0 (JSR-222) expert group so I'll share my thoughts.
- TopLink OXM provides a visual tool, the TopLink Workbench to map an existing XML schema to an existing object model.
- TopLink OXM can be exposed through the standard JAXB runtime APIs.
- TopLink OXM can be run with any JAXP compliant parser. Many binding solutions are dependent on a specific parser.
For more information on TopLink OXM/JAXB
http://www.oracle.com/technology/products/ias/toplink/oxm/index.html
My Oracle OpenWorld 2005 presentation
http://download-west.oracle.com/oowsf2005/1535.pdf
-Blaise

Similar Messages

  • Need some good links for JAXB Customization

    Hi all,
    Please gimme some good links for JAXB customization tutorial.
    cheers
    JoyBoy

    Hi all,
    Please gimme some good links for JAXB customization tutorial.
    cheers
    JoyBoy

  • XML JAXB Binding issue

    Hi All
    Im using Webservices in which i need to Bind my XML to Java objects and reverse. Im trying to use JAXB (1.0) Ref Imp from SUN as binding framework. The problem which im facing is that for elements like:
    <xs:element name="inputRequests">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" name="inputData" type="data" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    JAXB genetrates:
    1. InputRequest - Interface
    2. InputRequestImpl - Class
    3. InputRequestType - Interface
    4. InputRequestTypeImpl - Class
    in InputRequestType it has generated a getter method
    public java.util.List getInputData();
    but no setter method for 'inputData'.
    Can any one help on that how we can set a sequence element in JAXB classes. I even used JAXB 2.0, but faced same issue...
    No Setter for a LIST :-(((

    That method, getInputData() is returning a reference to a List Object that is already instantiated. Once you retrieve the reference, you can invoke all the methods in the List interface, but if there is a way to reassign the reference to refer to a different list, I'm not aware of one.
    I believe that limitation is necessary my the nature of JAXB. A JAXB Object, in your case a List, is guaranteed to be marshaled and unmarshaled to XML, if you redefine the reference to some arbitrary List, how could JAXB guarantee its functionality?
    I may be way off base here, I'm no JAXB expert by any means.
    Rather than redefining the reference to a different List, you have to manipulate the List
    ...getInputData().clear();
    ...getInputData().addAll(myRequestList);Right?

  • Error message customization issues

    Hi ppl,
    This is with regards to the issue with customization error messages, I have already gone through the following,but haven't been able to achieve what i want:-
    "Chapter 8.2-8.3" "Business Rules in ADF Business Components".( white paper )
    ADF Faces: How suppress item validation on partial submit ( Frank's blog entry )
    So im extremely dull or have been looking at the wrong place ( or both :( )
    my jdev version :-10.1.3
    My use case is follows, extremely simple form page for creating a user log in along with other information like passwords,description etc.
    I have certain basic validations
    -should contain one numeric
    -must not be less than 8 charecters etc
    i can do the following:-
    make my own customized message bundle and successfully throw it when my custom method validator fails , i do so by using the command:-
    throw new AdminJboException (AdminMsgBundle.USER_ID_NO_SPACE,params);
    where AdminMsgBundle is my customized bundle message class and AdminJboException is a custom class that extends JBo exception ( for conveniance ).
    What i can't do is this :-
    my error logs:-
    JBO-27024: Failed to validate a row with key null of type ........
    User Id cannot contain spaces ( my validation message )
    User ID - JBO-27025: Failed to validate attribute UserId with value .....
    User ID - JBO-27014: Attribute UserId in AdminAppModule.UserViewObj is required
    At validation ( i presume at validateEntity() ), my exception gets thrown ), but before that the JBO-27024 gets thrown (because the data doesnt get validated and hence not stored and hence null), following which the required error is thrown , following which the 27025 and 27014 are thrown. Is there anyway i can suppress the JBO default error messages ONLY when i know for sure that my validation error message has been thrown. I was able to suppress the JBO-27014 exception altogether from the EntityModelImpl ( out of frustration ) , and it worked , but obviously it hampered proper functioning in other areas.
    My question is :--
    Which is the simplest cleanest way of throwing only your customized message and ignoring the default JBO ones when your exception is thrown , and letting things go normally if your customized exception is not thrown... ?
    P.S i can even override the "content" of the message being thrown from 27014 etc, but thats not what i want .
    Thanks in advance !

    See the following set of topics in the Online Help:
    Developing Business Components
    Working with View Objects, View Links, Application Modules and Clients
    Creating and MOdifying View Object, View Links and Application Modules
    Ways to Handle Errors

  • Customize Issue Management mail

    I want to customize mail that get sent when status change on a task in Issue Management.
    Dose anyone know how to do this?
    Witch Action Profile and SmartForm are used?

    goto SPPFCADM
    CRM_ORDER
    choose action defintion and here choose ur action which is sending mail ..e.g email to message creator.
    Here goto to processing type and you get the name of the standard smartform
    Goto smartforms transaction and copy it to z* and make modification as per req...
    similarly you can enhance the clas etc....
    thus create a new zaction for mailing by copying from std and call this smartform and class
    Chk this blog
    /people/dolores.correa/blog/2007/09/18/sending-e-mail-from-support-message
    This will solve ur prb
    Regards
    Prakhar

  • Jaxb: customization for superClass

    Hi,
    I' trying to get JAXB to extend one of my classes in the implementation classes in the impl/ package. In the tutorial (1.1) there is some obscure hint to an xjc:superClass customization, but that seems not to work :-(
    Can someone point me to some more info or give me a hint how to do it?
    Thx & ciao,
    Leif

    Hi,
    I' trying to get JAXB to extend one of my classes in
    the implementation classes in the impl/ package. In
    the tutorial (1.1) there is some obscure hint to an
    xjc:superClass customization, but that seems not to
    work :-(
    Can someone point me to some more info or give me a
    hint how to do it?
    Thx & ciao,
    LeifCheck the vendor extension example in the <JWSDP1.1>/jaxb-1.0/examples
    folder. That has an example on how to use the superClass customization
    Thanks,
    Bhakti

  • Real world Workspace customization issues

    Background: We are creating a subset of workspace functionalities in a JSP application which will interact with LC Server over web services only without the use of Workspace APIs(which are combination of Flex UI APIs, Flex Domain APIs and Java Task Manager APIs). We want to directly use TaskManager APIs for that.
    ISSUE 1:  We are trying to invoke the Long-lived process from a JSP page
    using web  services but the process in not getting invoked.
    Here is the client JSP code.  Please also refer the attachment which has
    the web service proxy java  files:
    <%@ page import="com.adobe.idp.services.*" %>
    <%@ page  import="javax.xml.ws.Holder" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML  4.01 Transitional//EN"><%@page
    language="java" contentType="text/html;  charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="org.w3c.dom.Document"%><html>
    <head>
    <title>index</title>
    <meta  http-equiv="Content-Type" content="text/html;  charset=ISO-8859-1">
    </head>
    <body>
    SUCCESFUl!!
    <%
    String remoteURL;
    AIServerProcessesOrderNewSuppliesService service =  new
    AIServerProcessesOrderNewSuppliesService();
    AIServerProcessesOrderNewSupplies  document =
    service.getOrderNewSupplies();
    // Holder<BLOB> finalDoc =  new Holder<BLOB>();
    Holder<String> outVar = new  Holder<String>();
    InvokeResponse responseFor =  new
    InvokeResponse();
    XML xml = new XML();
    //document.invoke("passed  something", finalDoc,
    outVar);
    try
    // get the image  from the database
    //BLOB blob = finalDoc.value;
    // remoteURL =  blob.getRemoteURL();
    document.invokeAsync(xml);
    System.out.println(responseFor.toString());
    catch (Exception  e)
    e.printStackTrace();
    throw e;
    %>
    </body>
    </html>
    I don't see any error in JSP and  it doesn't throw any error but the
    server process is not getting invoked.  Please refer the attachment
    (MyLongLivedProcess.JPG)
    ISSUE 2:
    I  don't want to use workspace. And we also don't want to customize  the
    workspace. Actually, we need a single JSP that will be able to  do
    following stuff:
    1. Show all the tasks assigned to the currently  loggedin user.
    2. On click of the task, open the form associated with the  current
    selected task in browser/jsp.
    So, please tell me what APIs  should I use in my JSP for above mentioned
    functionalities. Please share a  dummy jsp that will do that.
    ISSUE 3:
    When a user logs in the  workspace, then he gets the actions associated
    with the particular tasks  below the form. E.g. approve, submit,
    complete, deny etc.
    But I want these  actions inside my form. Reason for that is that we are
    not using the Flex UI  of workspace. Infact we are creating a simple JSP
    that will render the  form.
    If you can provide some eclipse java project with required jars, a  JSP
    with above functionalities and a PDF form that solve issue number 3  then
    it will be great way to start.

    Background: We are creating a subset of workspace functionalities in a JSP application which will interact with LC Server over web services only without the use of Workspace APIs(which are combination of Flex UI APIs, Flex Domain APIs and Java Task Manager APIs). We want to directly use TaskManager APIs for that.
    ISSUE 1:  We are trying to invoke the Long-lived process from a JSP page
    using web  services but the process in not getting invoked.
    Here is the client JSP code.  Please also refer the attachment which has
    the web service proxy java  files:
    <%@ page import="com.adobe.idp.services.*" %>
    <%@ page  import="javax.xml.ws.Holder" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML  4.01 Transitional//EN"><%@page
    language="java" contentType="text/html;  charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="org.w3c.dom.Document"%><html>
    <head>
    <title>index</title>
    <meta  http-equiv="Content-Type" content="text/html;  charset=ISO-8859-1">
    </head>
    <body>
    SUCCESFUl!!
    <%
    String remoteURL;
    AIServerProcessesOrderNewSuppliesService service =  new
    AIServerProcessesOrderNewSuppliesService();
    AIServerProcessesOrderNewSupplies  document =
    service.getOrderNewSupplies();
    // Holder<BLOB> finalDoc =  new Holder<BLOB>();
    Holder<String> outVar = new  Holder<String>();
    InvokeResponse responseFor =  new
    InvokeResponse();
    XML xml = new XML();
    //document.invoke("passed  something", finalDoc,
    outVar);
    try
    // get the image  from the database
    //BLOB blob = finalDoc.value;
    // remoteURL =  blob.getRemoteURL();
    document.invokeAsync(xml);
    System.out.println(responseFor.toString());
    catch (Exception  e)
    e.printStackTrace();
    throw e;
    %>
    </body>
    </html>
    I don't see any error in JSP and  it doesn't throw any error but the
    server process is not getting invoked.  Please refer the attachment
    (MyLongLivedProcess.JPG)
    ISSUE 2:
    I  don't want to use workspace. And we also don't want to customize  the
    workspace. Actually, we need a single JSP that will be able to  do
    following stuff:
    1. Show all the tasks assigned to the currently  loggedin user.
    2. On click of the task, open the form associated with the  current
    selected task in browser/jsp.
    So, please tell me what APIs  should I use in my JSP for above mentioned
    functionalities. Please share a  dummy jsp that will do that.
    ISSUE 3:
    When a user logs in the  workspace, then he gets the actions associated
    with the particular tasks  below the form. E.g. approve, submit,
    complete, deny etc.
    But I want these  actions inside my form. Reason for that is that we are
    not using the Flex UI  of workspace. Infact we are creating a simple JSP
    that will render the  form.
    If you can provide some eclipse java project with required jars, a  JSP
    with above functionalities and a PDF form that solve issue number 3  then
    it will be great way to start.

  • PO Output Mail Customization Issue

    Hi,
    We are using SRM 7.0 and we have customized the PO output layout. As part of the customization we have also changed the mail with the PDF attachement. We have changed the mail to display different language output in the mail. The functionality was achieved as given belwo
    1) Create a copy of class CL_PD_PO_PROCESSING_BBP. (ZCL_PD_PO_PROCESSING_A and ZCL_PD_PO_PROCESSING_b)
    2) Modify method PROCESS_BBP_PO_MAI with the custom smartform name as required.
    3) SPRO->SRM Server->Cross Application Basic Settings->Set Output Actions and Output Format->Define Actions for Purchase Order Output
    4) Select BBP_PD_PO and double click Action Definition and Processing Types.
    5) Highlight Mail and click Set Processing button.
    6) Insert the copy of CL_PD_PO_PROCESSING_BBP created before in Processing Class.
    Now we have created two such custom class ZCL_PD_PO_PROCESSING_A and ZCL_PD_PO_PROCESSING_B. Recently i have added a new processing class and assigned the method ZCL_PD_PO_PROCESSING_B but during runtime i find it always picks up ZCL_PD_PO_PROCESSING_A.
    Any pointers as what might be going wrong?

    Hi,
    2 things over here:
    You mentioned in point 2
    2) Modify method PROCESS_BBP_PO_MAI with the custom smartform name as required.
    This is not required . To have the custom smartform to be picked you can implement the badi
    BBP_OUTPUT_CHANGE_SF. So that way you do not need to modify the standard SAP method.
    For the fact that the new class is not being picked. You can do the following
    Tr- SPPFCADM
    In this transaction Clean Up inconsistencies
    Check all the 4 check boxes and clean up the inconsitencies,
    It might solve the problem.
    Regards,
    Sapna

  • ESS/MSS EHP5 role customization issue

    Hi,
    We have implemented EHP5 roles on Enterprise Portal 7.0, other version details are: EHP6 and SP9.
    Following issues are coming:
    1. Our portal is having customized theme. However, the lpd_cust ESS/MSS roles created when rendered Portal is taking Standard blue theme, how can we get our custom theme when lpd_cust roles are launched on Portal.
    2. The link text is getting vertically splitted in service map area. Eg. If we have "User Manual" as link text of a application created under lpd_cust folder ESS->User Manual, the text is getting splitted. How can we adjust size of this text?
    Please check attachment for both issues.
    Looking forward for help.
    Regards,
    Ashvini.

    Hello Luke,
    Yes, I mean talent management. The appraisal forms are in the flexible template in SAP Portal.
    Thanks in advance for your help
    Best regards
    Joao

  • REG: ESS Screens customization issues

    Hi,
    I am trying to do some screen changes like,
    1) Trying to include the Start Date and End date in Personal Information ESS Application (NZ).
    After selecting the value in the Details screen, the actual value I selected is not passing to the Backend.
    Please guide me how to solve this issue.
    Thanks & Regards,
    Ashok Kumar M.

    Hi Ashok
    When you press New or Change by using the current date, a new record has to be created in Backend (except same cases, e.g. in the current date exists another record with same start date).
    BAdI HRXSS_PER_BEGDA is used to change the start/end date behaviour, according to infotype/subtype.
    If you are not maintaining BAdI HRXSS_PER_BEGDA for the corresponding infotype, then you cannot put a start date in the past for example.
    In order to handle the validity period for new ESS records, exists an enhancement in EHP4 (ECC 604), that you can activate, HCM_ESS_CI_1.
    After activation was done, you can go to V_T7XSSPERSUBTY table -> select infty/subty --> check 'Validity period for data can be set'.
    Regards

  • Multiple FF4 Navigation toolbar customize issues

    I experience weird behaviors when customizing the Navigation toolbar (and other FF4 toolbars as I recall):
    Every time I move or remove the last item (the one on the most right-hand side) in the Navigation toolbar, the following occurs:
    - The New Tab "+" button on the Tab bar disappears
    - The whole Navigation toolbar is blanked out
    - The menu bar (if displayed) is grayed out
    - All the toolbars disabled in View stay visible when closing Customize and Customize itself is grayed out, not offering the chance to fix this problem.
    If I close and reopen Firefox 4.0, the menu and toolbar appear and the Customize feature is selectable, except that the Navigation toolbar is blank, so I have to redo all the customization again.
    On another note, when customizing toolbars, there is no visual indication telling you which toolbar it is you are modifying. Since the height of the toolbars is very small, there should probably be a tooltip or some visual aid (the toolbar name) showing if you are dropping items on the Navigation or another toolbar.
    See 'more system details' for steps to repro.

    hello mu695,
    I have read your entire book of complaints (excuse me if I describe it in a way that you don't want, I intend no harm with this).
    and sadly enough I'll have to inform you that what you ask is not something that can be solved in a simple 1 2 3 solution, the toolbars and addons provided to firefox are mostly from thirth-party hosts or developers. this means that we cannot easily command them to change something.it is depending on those third-party developers themselves when toolbars and add ons get updated, however you might expext an update from google soon as they are known to be fast-responding to these kind of events. also to add to this bad news, I have to inform you that the way the toolbars look and behave is designed within the base of firefox, and as for that they can't be resolved in a day, it would take a lot of work and an entire update to change them,
    which is sadly enough just not possible for 1 user.
    however, I did summarize and file in your text with the developers they are very busy at the moment though, but if there are more people who have the same problem/ feeling as you then you might expect it to change soon in a future update.
    I am sorry about the inconvenience that I can't do any more for you but I hope that you will keep using firefox, and that in one of our future updates your request of easily resizeable, customizable and organizable tool bars will be fulfilled.

  • Customization Issues

    Good Morning Experts......Yesterday i did some customization like the one Single GO button...My problem Customization work is working good but only in IE 8 and Chrome
    Not in IE6 and my Client want to know what is the reason behind this? And also my users want in only IE6
    I am not an expert in java nor web if you have an Idea please let me know asap...
    Thanks in Advance

    Hi, have you done any custom configuration to have Chrome with OBIE? Currently our setup works correctly with IE and FireFox but doesn't work with Safari or Chrome. The chart and several images dont come up - Dashboards also dont show. Any suggestions?
    Web Server running on Solaris 10 - iPlanet Web Server

  • JAXB compiler problem in handling xsd:any and nillble = "true"

    Dear all,
    i am using jdeveloper 10.1.3.1 production release version.
    i am designing a xml schema that contain element of attribute nillable="true", for extensible, contain tag <xsd:any>.
    but i encounter 2 problem:
    1. for xml schema element with attribute nillable="true", no corresponding isNil(), setNil
    method is generated (refer to jaxb 1.0 spec. 5.7.1)
    2. cannot handle tag <xs:any> that generate incorrect java source code (cannot compile) [refer to jaxb 1.0 spec 5.9.5)
    *** i have add jaxb customization tag inside the <xs:any> tag
    ***   <xs:annotation><xs:appinfo>
    ***               <jaxb:property name="Extension"/>
    ***</xs:appinfo></xs:annotation>
    Does oracle's JAXB implementation conform to the JAXB 1.0 spec?
    Is it a known bug?
    Could anybody help me?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Refer to section
    E.2 Not Required XML Schema
    concepts
    "A JAXB implementation is not required to support the following XML Schema
    concepts for this version of the specification. A JAXB implementation may
    choose to support these features in an implementation dependent manner."
    E.2.2 Not supported while manipulating the XML
    content
    Schema component: wildcard
    (any)
    how can i know if an xml element with xsi:nil="true" (unmarshal)
    and set xsi:nil="true" for an element (marshal) ?
    According to the JAXB 1.0 specification:
    If {nillable} is "true", the methods setNil() and isNil() are
    generated.

  • Customize IC WebClient Profile

    Hi all,
    I started working on CRM 5.0 ICWC and i am facing some customization issue,
    I have copied BuPaMoreContactView.htm view of CRM_IC BSP Application into Z_CRM_ICW appln,
    In Framework Profile setting, I have maintained the Contoller Subsitute Z_CRM_ICW for CRM_IC.
    Also created one IC Web Client Profile for copiying the default profile setting into it, and have assigned
    framework profile  in the webclient profileu2019s functional profile u2018RUNTIMEu201D.
    I have attached the IC WebClient profile to my User Id..
    But still I am not able to see the modifications that I have done in the Z BSP Application.
    Is there any link between framework profile and IC WebClient profile which I am missing ??
    I checked through notes in oss there i am supposed create some BP and assigned that , canone anyone tell me how to save BP and where to assign that if required.
    regards
    Saurabh khanna

    Hi Saurabh
    In Transaction SU3 use:
    Parameter: CRM_ICWC_TEST
    Parameter Value: xX3456789
    Did you copy the controller for the view, Ideally you should copy the controller from transaction BSP_WD_WORKBENCH, this will take the view with it.
    Hope this helps
    Regards
    Arden

  • Issue in IC webclient

    Hi All,
    I have issue in CRM.
    When I go to ic web client (tcode: crm_ic), create a contract, save it, release it. Then add sold to party as contact person in partner tab. Then go to scheduled actions and click on add entry . a window is opened which have 7 chekboxes.
    Now I will change the process a bit,:
    create a contract, save it, release it. Then add sold to party as contact person in partner tab and save it again. Then go to scheduled actions and click on add entry . a window is opened which have zero entry this time.
    May be itu2019s a customization issue.
    Do any one of you have faced it ? If yes, how was it resolved.
    Regards,
    Abhimanyu

    done

Maybe you are looking for

  • Changed date and time and lost reference to proxy files

    I had a batch of transcoded proxy files (from a Canon 550d) that had the wrong time on them. I used "Modify > Adjust content created date and time" to shift them by an hour. FCP now reports "Missing Proxy" for all of them. I've checked in the events

  • FireTableStructureChanged and cell renderers

    Greetings, I am having an issue that google hasn't been able to resolve. I have a JTable with a few columns whose cells are "multi-line" (aka, Strings with one or more '\n' in them). Since the default renderers don't display the newlines, I searched

  • H.264 + Annotations/Metadata = No go

    I am using QuickTime 7 Pro to convert some DV footage into MPEG-4 H.264 encoded files. I use the Movie Properties menu to add metadata (or "annotations") such as Artist, Author, Comments, etc. The problem I'm having is, once the video is exported out

  • [Solved] Macbook Pro 9.2 Wireless issues

    I have been going through old posts trying to get my wireless installed. I downloaded compat-wireless and the b43 firmware. Any ideas or suggestions would be greatly appreciated. [blankwall@blankwall Downloads]$ iwconfig enp1s0f0  no wireless extensi

  • Menu button "clicked on"

    I'm waiting on 2 books I've ordered on Flash CS3 and Action Script but I have a deadline and I need to do the following: When a menu item is clicked, I want it to REMAIN a certain colour/ Currently, when I define a button, I have the option to specif