JAXB: not able to get Attribute value

Hi there,
I am using oracle JAXB for XML processing. I am not able to get the value of an attribute. I ran the same code in SUN JWSDP 1.3, which worked correctly. I am not able to get the "foo" attribute for <Table> element using oracle JAXB.
The XML schema follows:
<?xml version='1.0' encoding='UTF-8' ?>
<schema targetNamespace="http://www.oracle.com/iAS/aggregator"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:ag="http://www.oracle.com/iAS/aggregator"
xmlns="http://www.w3.org/2001/XMLSchema"
jaxb:version="1.0"
elementFormDefault="qualified">
<annotation>
<appinfo>
<jaxb:globalBindings fixedAttributeAsConstantProperty="true"
/>
<jaxb:schemaBindings>
<jaxb:package name="oracle.dms.aggregator.adml"/>
</jaxb:schemaBindings>
</appinfo>
</annotation>
<complexType name="Adml_T">
<sequence>
<element name="Table" type="ag:Table_T" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Version" type="token" fixed="10.1.3"/>
</complexType> <!-- Adml -->
<complexType name="Table_T">
<attribute name="foo" type="Name"/>
</complexType> <!-- Table -->
<element name="Adml" type="ag:Adml_T"/>
</schema>
The XML file is:
<?xml version='1.0' encoding='UTF-8' ?>
<Adml xmlns="http://www.oracle.com/iAS/aggregator">
<Table foo="foosailor">
</Table>
</Adml>
The java file is:
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import java.io.File;
import java.util.List;
import java.util.Iterator;
import oracle.dms.aggregator.adml.Adml;
import oracle.dms.aggregator.adml.TableT;
public class JaxbQA
public static void main (String[] args)
throws Exception
Adml adml;
String fileName = "aggregator.xml";
String instancePath = "oracle.dms.aggregator.adml";
JAXBContext jc = JAXBContext.newInstance(instancePath);
Unmarshaller u = jc.createUnmarshaller();
u.setValidating(true);
Object obj = u.unmarshal(new File(fileName));
adml = (Adml)obj;
List tables = adml.getTable();
for (Iterator iter = tables.iterator();
iter.hasNext();)
TableT admlTable = (TableT)iter.next();
String name = admlTable.getFoo();
System.err.println("table foo=" + name);
c:\oracle\jdk\bin\java.exe -classpath .;c:\oracle\xdk\lib\xmlparserv2.jar;c:\oracle\xdk\lib\xml.jar JaxbQA
table foo=null

I tested in both 10.1.0.2.0 and 10.1.0.3, which both showed the same problem. A bug #3621204 has been filed.

Similar Messages

  • NOt able to get text value for 0calmonth in the query

    hi,
    I am not able to get the test for the calmonth in the selection screen of the Query.
    i.e If the user enter the value 01/2010 as input in the selection screen. I am not able to get its text Janurary 2010 displayed in the selection screen of the query.
    please let me know what could be the reason for this.
    regards,
    Mahesh

    Hi Mahesh,
    I regret to inform you there is no option to display the month text.
    The system works as designed. The "Key and text" option for the      
    infoObject is for display the technical name and the description.                                                                               
    I found a customer on SDN which the same doubt and the answer for your
    question. Please, check the link below:                                                                               
    0calday text variable        
    Best Regards,
    Des

  • I am not able to get PO Value in MCE1, MCE3, MCE5 and MCE7

    Hi Gurus,
    Here i am having the probelm with these transactions MCE1, MCE3, MCE5, MCE7.
    In these t-codes we are not able to get Purchase Order Values...  Please help me out from this ... To get the PO Value what should i do .... there PO  values are showing '0.00' (Zero)..
    this is urgent for my client... they want to use these transaction..
    Rewards in advance....
    Regards,
    Naveen Myneni

    Hi Dhanya,
    >>I have one image id in my application which is dynamic and while replaying my script is failing.
    From your description, could you please tell me which kind of application you create?
    What type test you create in VS, is it the Web Performance test or other type test?
    If you are running the web performance test for your application in VS, as you said that the image id is dynamic value. I suggest you can refer the following article to debug your issue, maybe you will get more useful message.
    For more explanation and solutions, please see:
    How to debug a Web Test 
    If I misunderstanding your issue. please tell me more detail message about your issue.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Not able to get net value in billing document vf01.

    Hello Sir,
    I am trying to create an invoice for  milestone billing plan. I have maintained copy controls  at item level as follows
    coplying req.  002
    vbrk/vbrp        001
    pricingtype     D
    billing qntty     A
    while i save contract and trying to create billing document  system is not able to show net value in billing document. 
    Please guide me to get the net value in the billing document.
    looking forward to reply.

    Sir, May I know what is the process to confirm milestone billing. as per my knowledge we release billing block and then billing document is processed.
    In my case even if i release billing block billing document succesfully created and saved but net value seems zero.
    I am not aware of complete proces.
    reply would be appreciated.
    thanks

  • Not able to get the value in the next page

    Hi,
    I am newbee for JSF and this question may sound silly. I tried to search through this
    forum, google....but did not find a solution....I hope some one here could please help
    me :-(
    I have Page1 and Page2. Page1 has a h:inputText field and a submit button.
    On click of the "Submit" button in Page1, I have to pass this text value entered by
    the user to Page2. In Page2, I have <h:inputText readonly="true" /> field,
    which will display the value that the user entered in Page1. Also, Page2 has a "Submit"
    button. On click of Page2.Submit button, the value displayed in the Page2.textfield
    is not getting populated to the Page2 bean attribute.
    Here are the code that I am using
    1. Page1:
    <f:view>
    <h:form id="Page1">
         <h:inputText id="primaryKey" required="true" value="#{Page1.primaryKey}" />
         <h:commandButton id="command" value="Submit" action="Page1"/>
    </h:form>
    </f:view>
    2. Page2:
    <f:view>
    <h:form id="Page2">
         // Yes, Value attribute points to Page1.primaryKey to display user entered value in this page.
         <h:inputText id="test" value="#{Page1.primaryKey}" readonly="true" />
         <h:commandButton id="command" value="Submit" action="#{Page2.save()}"/>
    </h:form>
    </f:view>
    3. faces-config.xml
    <navigation-rule>
    <from-view-id>/Page1.jsp</from-view-id>
    <navigation-case>
    <from-outcome>Page1</from-outcome>
    <to-view-id>/Page2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Page1</managed-bean-name>
    <managed-bean-class>com.Page1Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/Page2.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/success.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Page2</managed-bean-name>
    <managed-bean-class>com.Page2Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    4. com.Page1Bean.java
    public class Page1Bean {
         private String primaryKey;
         //getter and setter method below
    5. com.Page2Bean.java
    public class Page2Bean {
         private String test;
         //getter and setter method below
         public String save() {
    Now let me explain my issue, I enter a value in Page1 -> click on submit -> I see this value in the text field of
    Page2. But when I click on submit button of Page2, test attribute is still null. Could you please suggest me what
    am I suppose to do inorder to get this value in Page2Bean when I click on save button?
    Hope to listen from one of you,
    Thank you,
    VinodRamu

    Go here
    http://jsffaq.com/
    Many of your questions will be answered

  • Not able to get the value in ADF taskflow on load

    Hi,
    I have created an ADF task flow. I have created a ViewObject in this ADF taskflow and I am setting the value of this ViewObject using the java API.
    The issue is that i need to show the data when this ADF task flow executes first time.
    Currently I am getting the blank table in jspx page when ADF task flow is run. Now when I click on a button then I can see the required data in the table.
    Please help me to solve this issue.

    Thanks for the reply.
    I have tried placing the code to get the set the data in table and display the same from table in bean constructor, but I am getting table value as null.
    Looks like it is not able initialize the table until the jsff page gets loaded.
    Does jsff page gets loaded after bean constructor method gets called ?

  • Not able to get the value from type defined in other progarm

    Hi All,
    I have a create a type in one package spec(Globally), now i am using the same type in another package.Simply i am calling the first package and try to store the value in Type and use the same type in second package.
    But i am not able get the value
    Type declaration
    Declared in package Spec
    TYPE t_aa_derive_tbl_type IS TABLE OF xxxx%ROWTYPE;
       t_aa_derive t_aa_derive_tbl_type;
    Package 1
    Package1. PROCEDURE name(
    some parameters);
    is
    Cursor
    c1 is Select * from dual;
    begin
          OPEN c_aa_derive;
            FETCH c_aa_derive
            BULK COLLECT INTO t_aa_derive;
            CLOSE c_aa_derive;
         END get_aa_derive;
    In My second package
    I am calling
    Package1. PROCEDURE name(
    some parameters);
    and then i am trying to
    for i in 1 .. package1.t_aa_derive.COUNT
      LOOP
    end loop;
    I am not able entered the loop for some reason.
    Could some one guide me if anything i missed.
    Cheers,
    San

    I have a create a type in one package spec(Globally), now i am using the same type in another package.Simply i am calling the first package and try to store the value in Type and use the same type in second package.
    Why?
    1. Why aren't you just using SQL to do the work?
    2. Why don't you just open a CURSOR and pass that instead?
    BULK COLLECT INTO t_aa_derive; 
    3. Why aren't you using a LIMIT clause? Are you sure that only a very small number of rows will be queried?
    4. Why aren't you using a PIPELINED function instead of passing a collection?
    Using collections with potentially unlimited numbers of rows is not scalable. Also, using collections can be more difficult for 'data consumers' to work with than if you just use a CURSOR or PIPELINED function.
    Make sure you are using the proper architecture so that your code is both modular, scalable and easy to use.

  • Modify New VO but not able to see Attribute Value.

    Hi ,
    I am facing one problems during my VO extend. I have done below step,
    1) Created new XXCustomVO based on exsiting CustomVO.Created new Attribute, modify SQL and mapped and gave new Name XXCustomInfoVO.
    2) Assign this new XXCustomVO to new filed with Attribute name.
    4) Copy XXCustomVO.xml and all class file from Desktop to Server in respecitve folder.
    5) Import Page regions which i have created New Item.
    6) Import with JPXImport.("Porject substitutions" )
    7) Now I run the page no errors found but not able to see new attribute Data.
    Then I checked "About Page" but everything is refected correctly only not able to see new attribute data.
    Can you please help me out. Is there any wrong thing i am doing or something is missing still.
    Thanks

    Hi ,
    Even exsiting attribute value alos not display. I mean I have 20 attribute in this exsiting VO and I have add one more XX attribute and same as XXVO but non of value is display out of 21 attibute.
    Even i have hard coded "1234" for this attribute but always return null.
    Where I have to foucs.
    thanks
    Raj
    Message was edited by:
    RajPatel

  • Not able to get changed values in the SAVE EVENT in ServHPartnerDet view

    Hi Experts,
    I am new CRM WEB IC, i have requirement like need to access four IBASE fields from BupaIbaseDetail and need to display those fiedls in ServHPartnerDet view. I am able display the fields and its values in the target view. But when user press change button and changes those four fields and press save button not able get the changed values in to the SAVE EVENT.Anyone please help me in this.
    IBHEADER , IBASEADDRESS  are the CONTEXT NODE CREATED in target view. I have binded IBHEADER to CuCoIbase custom controller and getting four fields data from IBASEADDRESS. below is the code for CREATE_CONTEXT_NODES.
    METHOD create_ibaseaddress.
      DATA:
        model        TYPE REF TO if_bsp_model,
        coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
        entity       TYPE REF TO cl_crm_bol_entity,              "#EC *
        entity_col   TYPE REF TO if_bol_entity_col.             "#EC *
      model = owner->create_model(
          class_name     = 'ZL_CRM_IC_SERVHPDET_CN00'
          model_id       = 'IBaseAddress' ).                    "#EC NOTEXT
      ibaseaddress ?= model.
      CLEAR model.
      coll_wrapper =
        ibheader->get_collection_wrapper( ).
    TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        TRY.
            entity_col = entity->get_related_entities(
                            iv_relation_name = 'FirstLevelComponent' ).
          CATCH cx_crm_genil_model_error.
        ENDTRY.
        TRY.
            entity ?= entity_col->get_current( ).
          CATCH cx_sy_move_cast_error.
        ENDTRY.
        CLEAR entity_col.
        IF entity IS BOUND.
          TRY.
              entity_col = entity->get_related_entities(
                              iv_relation_name = 'ComponentAddress' ).
              ibaseaddress->set_collection( entity_col ).
            CATCH cx_crm_genil_model_error.
          ENDTRY.
        ENDIF.
      ENDIF.
    ENDMETHOD.

    Code i have written in the CREATE_CONTEXT_NODE method for my custom context nodes( IBHEADER,IBASEADDRESS).
    this  CREATE_IBHEADER some data related to IBASE header then from this reading the IBASEADDRESS contextnode fields for displaying in the ServHPartnerDet. It is working fine but After changing the four fields values in the ServHPartnerDet view and trying to save, then context is not reading the new values it gives the old values only.
      TRY.
          lr_coll_wr = ztyped_context->ibaseaddress->get_collection_wrapper( ).
          IF lr_coll_wr IS BOUND.
            lr_entity ?= lr_coll_wr->get_current( ).
          ENDIF.
        CATCH cx_crm_genil_model_error.
      ENDTRY.
      CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
        EXPORTING
          iv_attr_name = 'BUILDING'
        IMPORTING
          ev_result    = lw_building.
    the building has got result of old value no the new value.
    method CREATE_IBHEADER.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_CRM_IC_SERVHPDET_CN01'
            model_id       = 'IBHEADER' ). "#EC NOTEXT
        IBHEADER ?= model.
        CLEAR model.
    bind to custom controller
      DATA:
          cuco TYPE REF TO cl_crm_ic_cucoibase_impl,
          cnode TYPE REF TO cl_bsp_wd_context_node.
      cuco ?= owner->get_custom_controller(
            'CuCoIbase' ).                                      "#EC NOTEXT
      cnode ?=
        cuco->typed_context->ibaseheader.
      coll_wrapper = cnode->get_collection_wrapper( ).
      ibheader->set_collection_wrapper( coll_wrapper ).
    endmethod.

  • Not able to get ItemKey value on OAF page.

    Hi OAF Gurus,
    I build a OAF transaction based on Workflow where I am using below code , but getting NULL values for itemKey
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OADBTransaction oadbtransaction = am.getOADBTransaction();
    SSHRParams sshrparams = new SSHRParams(oadbtransaction);
    // gives null String itemKey = sshrparams.getItemKey();
    // gives null String itemKey = OANavigation.getItemKey(pageContext);
    // gives null String itemKey = WFUtility.getItemKey(pageContext);
    // gives null String itemKey = ((StringBuffer)oadbTxn.findObject("wfItemKey")).toString();
    // gives null String itemKey = oaNavigation.getItemKey(pageContext);
    BIG QUESTION : How to get the itemKey???????????
    Other approaches : I extended my custom AM to oracle's AM (thinking that may be new SSHRParams(oadbtransaction), might work with oracle's transaction), but no luck
    Facts
    1. Workflow has started and this page has been invoked from workflow using BLOCK function.
    2. If I hard code the itemKey and itemType, I can calculate the activity id correctly using String activityId = new String(""+WFUtility.getActivityId(am, itemType, itemKey));
    3. I need the itemKey to abe able to navigate to NEXT or PREVIOUS page in the workflow example : WFUtility.wfTransitionActivity(pageContext, itemType, itemKey,activityId, "NEXT"); when next button is clicked
    Please help me out in this.
    Thanks,
    Chaitanya

    I am posting what approach worked for me.
    Step 1: Create a Page called InitContextPG.xml , set a controller InitContextCO.java
    Step2: In InitContextPG.xml set Application module as oracle.apps.per.selfservice.common.server.CommonAM
    Step 3: Edit InitContextCO.java
    import oracle.apps.per.selfservice.common.SSHRParams;
    import oracle.apps.per.selfservice.payrate.PayRateParams;
    import oracle.apps.per.selfservice.workflowservice.server.WFUtility;
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    /* Logging Code*/
    if(pageContext.isLoggingEnabled(OAFwkConstants.PROCEDURE))
    {pageContext.writeDiagnostics(this," processRequest().START ",OAFwkConstants.PROCEDURE);}
    super.processRequest(pageContext, webBean);
    //.........................................SETTING PAY_RATE_PARAMS.................................................................
    //oadbTxn.getValueNames();
    Hashtable PAY_RATE_PARAMS = (Hashtable)oadbTxn.findObject(PayRateParams.m_name);
    if(PAY_RATE_PARAMS==null){PAY_RATE_PARAMS= new Hashtable();}
    pageContext.putSessionValueRaw(PayRateParams.m_name,PAY_RATE_PARAMS);
    writeLog(pageContext,PayRateParams.m_name+"="+PAY_RATE_PARAMS);
    //.........................................SETTING SSHR_PARAMS.................................................................
    Hashtable SSHR_PARAMS = (Hashtable)oadbTxn.findObject(SSHRParams.m_name);
    if(SSHR_PARAMS==null){SSHR_PARAMS= new Hashtable();}
    pageContext.putSessionValueRaw(SSHRParams.m_name,SSHR_PARAMS);
    writeLog(pageContext,SSHRParams.m_name+"="+SSHR_PARAMS);
    //.........................................SETTING WORKFLOW ACTIVITY.................................................................
    SSHRParams sshrparams = new SSHRParams(pageContext.getRootApplicationModule().getOADBTransaction());
    String itemKey =sshrparams.getItemKey();
    String itemType = sshrparams.getItemType();
    String activityId = sshrparams.getActivityId();
    WFUtility.wfTransitionActivity(pageContext, itemType, itemKey,activityId, "DEFAULT");
    /* Logging Code*/
    if(pageContext.isLoggingEnabled(OAFwkConstants.PROCEDURE))
    {pageContext.writeDiagnostics(this,"processRequest().END",OAFwkConstants.PROCEDURE);}
    Step4 : Create a FND Function Y_HR_INIT_CONTEXT_SS having html call to InitContextPG.xml
    Step 5 : In the Workflow create a Function, called Init Context
    set : Function Name : HR_WORKFLOW_SERVICE.BLOCK
    set : Function Type : PLSQL
    set : Result Type : HR MEE Transacitons V4.0
    Node Attribute : HR Activity Type : JSP
    Node Attribute : HR Activity Type Value : Y_HR_INIT_CONTEXT_SS
    Step 6: So Workflow should look like
    START-----<default>---------> Init Context -----------<default>-------> MY_PAGE (which needs WF parameters)
    Step 7. Now you have MY_PAGE.xml where you need the ItemKey and ActivityID etc., create a controller MY_PAGE_CO.java
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    /* Register the ORACLE HRMS Objects before super.processRequest*/
    this.registerObject(pageContext,SSHRParams.m_name);
    this.registerObject(pageContext,PayRateParams.m_name);
    super.processRequest(pageContext, webBean);
    SSHRParams sshrparams = new SSHRParams(oadbTxn);
    String itemKey =sshrparams.getItemKey();
    String itemType = sshrparams.getItemType();
    String activityId = sshrparams.getActivityId();
    // You Finally have the values of itemKey ,itemType and activityId
    OAApplicationModule am = pageContext.getRootApplicationModule();
    OADBTransaction oadbTxn = am.getOADBTransaction();
    * Registers an object from session to transaction.
    public void registerObject(OAPageContext pageContext,String ObjectName)
    Object objectValue = (Object)pageContext.getSessionValueRaw(ObjectName);
    this.writeLog(pageContext,ObjectName+"="+objectValue);
    OAApplicationModule am = pageContext.getRootApplicationModule();
    OADBTransaction oadbTxn = am.getOADBTransaction();
    /* Check if the Object is registered already, else register it*/
    if(oadbTxn.findObject(ObjectName) == null && objectValue!=null)
    oadbTxn.registerObject(ObjectName,objectValue);
    Edited by: Chaitanya Dubey on Feb 3, 2011 1:45 PM
    Edited by: Chaitanya Dubey on Feb 3, 2011 1:54 PM
    Edited by: Chaitanya Dubey on Feb 3, 2011 1:54 PM

  • Not able to read attribute value

    Hello Experts.
    I have child WD component say u201CBu201D,  in this created node (Name : B) with one attribute (Name : Test) and selected as interface node.In this component I am setting the value for attribute (Name : Test).
    I have added above WD component u201CBu201D  in the parent WD Component u201CAu201D as Used Webdynpro Component. So I got node (Name : B)  in the component parent  Component u201CAu201D.
    When I am trying to read attribute (Name : Test) it is coming empty in Parent Component u201CAu201D.
    I have verified all the binding and basic things  everything looks fine but I am getting empty value in Parent Component u201CAu201D.
    Thanks in Advance.
    BR
    - CW

    I  want to access Attribute 'TEST 'of the Component B in Component A. Normally it should come if node is exposed as interface BUT It is not coming.
    Carlin,  you will get the TEST attributes value in Component 'A' only if the value for 'TEST' attribute is set in Component 'B'.
    in Component A, if you try to read the value of TEST attribute before its value been set in Component 'B' then you will get empty value only.
    in some way you need to tell the component 'B' to set the value for 'TEST' Attribute before accessing it in Component A.
    one way is to expose the SET_ATTRIBUTE method and calling the same from Component A
    another way is to embed the B's interface view into A's view and then explicitly clicking on the buttons in B's interface view.
    Unless the value is not set by Component B, if you it access in Component A, you will get initial value only.
    Hope its clear.
    BR,
    Saravanan

  • Not able to get the values from screen field?

    hello
    i am using MIRO and there is a screen name withholding tax and from there i want to retreive the withholding tax code before saving so that i can do some validations on it but how can i retrieve the values.
    when i press f1 there it shows structure not the table and structure contains no value so please help me in this so that i can retreive that value during run time
    thank you

    Hi Vikas,
    you can use this badi MRM_WT_SPLIT_UPDATE, the method will be WHTAX_SPLIT_UPDATE
    in this badi please see the importing and exporting parameters, you will get the  values of withholding tax code  as TE_RBWS in export parameters.
    Please search in google or SCN you will get how to use it.

  • Not able to get distict values even after defining  MAP MEMBER FUNCTION

    Hi,
    I am trying to get distinct values from a query to a table type. Please see the code below
    CREATE OR REPLACE TYPE T_COPY_EVNT_DTL
    IS
      OBJECT
        eventId               VARCHAR2(100),
        eventDescription      VARCHAR2(100),
        promoMonthDescription VARCHAR2(100),
        promoStartDate        VARCHAR2(100),
        promoEndDate          VARCHAR2(100),
        PROMOCOSTSTARTDATE    VARCHAR2(100) ,
        MAP MEMBER FUNCTION sort_key
        RETURN VARCHAR2 );
    CREATE OR REPLACE TYPE BODY T_COPY_EVNT_DTL
    AS
      MAP MEMBER FUNCTION sort_key
      RETURN VARCHAR2
    IS
    BEGIN
      RETURN eventId ;
    END;
    END;
    CREATE OR REPLACE TYPE T_EVENT_TABLE
    IS
      TABLE OF T_COPY_EVNT_DTL;
              with event_data as (
    select '1' event,'event1' event_desc,'monthdesc1' promo_month_desc ,'01/01/2001' promo_start_date     ,'01/01/2002' promo_end_date,'01/02/2001' promo_cost_start_date from dual union all     
    select '1' event,'event1' event_desc ,'monthdesc1'promo_month_desc ,'01/01/2001' promo_start_date     ,'01/01/2002' promo_end_date,'01/02/2001' promo_cost_start_date from dual union all
    select '3' event,'desc3' event_desc ,'monthdesc3' promo_month_desc,'01/01/2001' promo_start_date     ,'01/01/2002' promo_end_date,'01/02/2001' promo_cost_start_date from dual union all
    select '2' event ,'desc2' event_desc ,'monthdesc2' promo_month_desc ,'01/01/2001' promo_start_date     ,'01/01/2002' promo_end_date ,'01/02/2001' promo_cost_start_date from dual )
    SELECT  cast(collect(distinct t_copy_evnt_dtl(event,
                                                                                                                        event_desc,
                                                                                                                        promo_month_desc,
                                                                                                                        promo_start_date,
                                                                                                                       promo_end_date,
                                                                                                                  promo_cost_start_date) ORDER BY
                                                                event_desc,
                                                                promo_month_desc,
                                                                promo_start_date,                                                   
                                                                promo_end_date,                                           
                                                                promo_cost_start_date) as t_event_table)  from event_data;
    result :
    T_EVENT_TABLE('T_COPY_EVNT_DTL('2','desc2','monthdesc2','01/01/2001','01/01/2002','01/02/2001')',
              'T_COPY_EVNT_DTL('3','desc3','monthdesc3','01/01/2001','01/01/2002','01/02/2001')',
              'T_COPY_EVNT_DTL('1','event1','monthdesc1','01/01/2001','01/01/2002','01/02/2001')',
              'T_COPY_EVNT_DTL('1','event1','monthdesc1','01/01/2001','01/01/2002','01/02/2001')')Please help me to find out the reason why it is not working...

    Remove the comma from T_COPY_EVNT_DTL TYPE.
    ORA-22800 indicates invalid user-defined type.
        PROMOCOSTSTARTDATE    VARCHAR2(100) ,
        MAP MEMBER FUNCTION sort_keyAnd it will be fine.
    SQL> CREATE OR REPLACE TYPE  T_COPY_EVNT_DTL
      2  IS
      3    OBJECT
      4    (
      5      eventId               VARCHAR2(100),
      6      eventDescription      VARCHAR2(100),
      7      promoMonthDescription VARCHAR2(100),
      8      promoStartDate        VARCHAR2(100),
      9      promoEndDate          VARCHAR2(100),
    10      PROMOCOSTSTARTDATE    VARCHAR2(100),
    11      --,
    12      MAP MEMBER FUNCTION sort_key
    13      RETURN VARCHAR2 );
    14  /
    Type created
    SQL>
    SQL> CREATE OR REPLACE TYPE BODY T_COPY_EVNT_DTL
      2  AS
      3    MAP MEMBER FUNCTION sort_key
      4    RETURN VARCHAR2
      5  IS
      6  BEGIN
      7    RETURN eventId ;
      8  END;
      9  END;
    10  /
    Type body created
    SQL>
    SQL> CREATE OR REPLACE TYPE T_EVENT_TABLE
      2  IS
      3    TABLE OF T_COPY_EVNT_DTL;
      4  /
    Type created
    SQL>
    SQL>     with event_data as (
      2  select '1' event,'event1' event_desc,'monthdesc1' promo_month_desc ,'01/01/2001' promo_start_date  ,'01/01/2002' promo_end_date,'01/02/2001' promo_cost_start_date from dual union all
      3  select '1' event,'event1' event_desc ,'monthdesc1'promo_month_desc ,'01/01/2001' promo_start_date  ,'01/01/2002' promo_end_date,'01/02/2001' promo_cost_start_date from dual union all
      4  select '3' event,'desc3' event_desc ,'monthdesc3' promo_month_desc,'01/01/2001' promo_start_date  ,'01/01/2002' promo_end_date,'01/02/2001' promo_cost_start_date from dual union all
      5  select '2' event ,'desc2' event_desc ,'monthdesc2' promo_month_desc ,'01/01/2001' promo_start_date  ,'01/01/2002' promo_end_date ,'01/02/2001' promo_cost_start_date from dual )
      6  SELECT  cast(collect(distinct t_copy_evnt_dtl(event,
      7                                                 event_desc,
      8                                                 promo_month_desc,
      9                                                 promo_start_date,
    10                                                promo_end_date,
    11                                              promo_cost_start_date) ORDER BY
    12                          event_desc,
    13                          promo_month_desc,
    14                          promo_start_date,
    15                          promo_end_date,
    16                          promo_cost_start_date) as t_event_table)  from event_data;
    CAST(COLLECT(DISTINCTT_COPY_EV
    <Object>

  • Hi There, I'm not able to Get the value for echo %cust_top% for custom dev

    Hi,
    Before doing any thing in dos usually i run envshell
    Which let me to switch to product specific location through Appl_top, au_top etc
    I'm Sending Out Put At cmd Prompt Please Check
    D:\oracle\visappl>echo %ar_top%
    d:\oracle\visappl\ar\11.5.0
    but not able to work for custom development.
    D:\oracle\visappl>echo %cust_top%
    %cust_top%
    D:\oracle\visappl>
    Why it's so?
    Bachan.

    Hi There,
    I got document, but not able to understand 2nd step i.e
    "2) Add the custom module into the environment
    Apply ADX.E.1 and add the entry to topfile.txt as a standard product top entry (follow the existing model in the file)
    Customised environment variables can be added to AutoConfig by using the filename specificed by s_custom_file, which is then called from the APPSORA.env file.
    If using Forms Listener Servlet, you may also need to add $CUSTOM_TOP to formsservlet.ini in $APACHE_TOP/Jserv/etc"
    1. What is ment by ADX.E.1 and topfile.txt ?
    2. And How can i add to "AutoConfig by using the filename specificed by s_custom_file, which is then called from the APPSORA.env file. " ?
    3. And agin What is ment by "If using Forms Listener Servlet, you may also need to add $CUSTOM_TOP to formsservlet.ini in $APACHE_TOP/Jserv/etc"
    Please Give a breaf note on this Question's.
    Thanks Bachan

  • Not able to get the value of ODI Variable when i pass thru Option

    Hi,
    I have ODI variable called prev_etl_run_date which will hold the last successful etl run date. I want to use the value of this variable in one of my KM step.
    But i don’t want to use directly in my KM. So I passed the variable name thru KM Option.
    I intend to use the variable’s value in the KM step, as shown below:
    <%=odiRef.getOption("MY_OPTION_1")%>
    Here I am expecting the value of the variable, but here I am only getting the variable name only.
    Is there any substitution method available in ODI KM , please help me to solve this issue.
    Thanks
    nidhi

    ODI options are not intended for run time parameters. They are like design choices or debugging flags or parameters that can be specified in code template. Previous ETL run time stamp is hardly a design choice.
    On the other hand, it is really a bad practice to put a variable inside KM directly. That creates a dependency that you can easily avoid by putting a filter using that variable in the interface.

Maybe you are looking for