To access the elements of an array of elements based on the value of the attribute

Hi all

I create a BPEL 11 g process that calls a web service which returns a data table. I need iterator on the data elements and access based on their attribute value.

Here is a sample web service load:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/apps/inv/soaprovider/plsql/item_pub/get_item/">
         <GET_ITEM>
            <Row>
               <Column name="ORGANIZATION_ID" sqltype="NUMBER">101</Column>
               <Column name="ORGANIZATION_CODE" sqltype="VARCHAR2">MyOrg</Column>
               <Column name="SEGMENT1" sqltype="VARCHAR2">MySegment</Column>
               <Column name="DESCRIPTION" sqltype="VARCHAR2">Upload 445</Column>
               <Column name="PRIMARY_UNIT_OF_MEASURE" sqltype="VARCHAR2">Each</Column>
               <Column name="PRIMARY_UOM_CODE" sqltype="VARCHAR2">EA</Column>
               <Column name="ITEM_CREATION_DATE" sqltype="VARCHAR2">01/21/2014 09:22:35</Column>
               <Column name="ITEM_UPDATE_DATE" sqltype="VARCHAR2">01/21/2014 09:22:35</Column>
               <Column name="REVISION" sqltype="VARCHAR2">0</Column>
               <Column name="REVISION_LABEL" sqltype="VARCHAR2">0</Column>
               <Column name="REV_CREATION_DATE" sqltype="VARCHAR2">01/21/2014 09:22:57</Column>
               <Column name="REV_UPDATE_DATE" sqltype="VARCHAR2">01/21/2014 09:22:57</Column>
            </Row>
            <Row>
               ...
            </Row>
            <Row>
               ...
            </Row>
         </GET_ITEM>
      </OutputParameters>
   </env:Body>
</env:Envelope>

How can I get some columns based on the name of the column attribute?

I tried to do this:

bpws:getVariableData('getItemResponse','body','/ns7:OutputParameters/ns7:GET_ITEM/ns7:Row[$partIndex]/ns7:Column[@name='SEGMENT1'])

and

bpws:getVariableData('getItemResponse','body','/ns7:OutputParameters/ns7:GET_ITEM/ns7:Row[bpws:getVariableData('partIndex')]/ns7:Column[@name='SEGMENT1'])

but I got this compilation error:

Error (157): xpath expression "bpws:getVariableData ('getItemResponse', 'body','/ ns7:OutputParameters / ns7:GET_ITEM / ns7:Row [bpws:getVariableData('partIndex')] / ns7:Column [@name = 'SEGMENT1'])" appearing is not valid, because XPath query syntax error. The syntax error occurs when parsing bpws:getVariableData ('getItemResponse', 'body','/ ns7:OutputParameters / ns7:GET_ITEM / ns7:Row [bpws:getVariableData('partIndex')] / ns7:Column [@name = 'SEGMENT1']) expression XPath, posted on 112. The XPath query syntax was false; the exception was: anticipated :). Check the detailed origin described in the text of the exception message and verify that the XPath expression that is named in the error message is correct. The XPath expression is defined in the BPEL process.

I use JDeveloper 11.1.1.7.0

Thanks in advance,

Bill

Use an entitlement and copy node and you can get it to work by using the syntax below.

Assign an expression of the copy below syntax: -.

 

       

Query="/ns1:GET_ITEM/ns1:row[$index]/ns1:column[./@name='Segment1']"/ >

       

     

Query = "" / client: processResponse / client: result "/ >"

Tags: Fusion Middleware

Similar Questions

  • How to access the attributes of VO through binding...

    I have a lookup table that has 2 columns namely encode and attrib.

    I created a ViewObject with SQL like:

    SELECT THE CODE, REFER TO THE STUDY_TYPE_CODES

    And he stated in an Application Module.

    Now I want to post it to the end-user as part of a selection
    that should show REFER to but returns the value CODE.

    I want to iterate the elements and generating the choices myself.
    So I tried this on my page:

    < af:selectOneChoice label = "Test" required = "true" >

    < af:forEach elements = "#{bindings." Var StudyTypeCodesVVO1.allRowsInRange}"="row">

    "< af:selectItem value =" #{row.code} "label =" #{row.describ} "id ="si3"/ >

    < / af:forEach >

    < / af:selectOneChoice >

    It gives an error. Looks like how I use
    "#{row.code}" or "#{row.describ} ' is false.  If I ' # {line} "then
    It's OK, and I could see that the line is a

    ViewRow [oracle.job.Key []]

    But I do not know how to access attributes by name 'Code' and ' means ".". " I also tried
    "#{rank." Code}"with the capital and it does not work.

    How to access the attributes 'code' and 'describe' of each line?

    Kindly help.

    Thank you.

    Check the RangeSize property on the iterator to pageDef.

    Dario

  • How to access the attributes of text (bounding box) selection in a pdf document

    How can access us the attributes of text in a PDF (bounding box) selection when the selection is made with the findtext under vba javascript method?

    I am currently looking for this attribute or method I need to position the buttons on specific words in a pdf file.

    In JS, this is done by using the getPageNthWordQuads method which returns an array of quads that represents this specific word.

  • How to access the attribute of the Parent of a child node?

    Hello

    I'm trying to accomplish something simple here, by accessing the value of the attribute of the node parent to a value of the child. I have the date given here, but I'll try to find the name of the event to the date, the name of the event or the attribute parent date.

    I have the code here, as in the following, but I kept getting #1009 error term undefined in line with parent() inside. Could someone please guide me on how to solve this problem?

    Thanks in advance.

    Alice

    "alice_data" wrote in message
    News:gr2fkh$CRE$1@forums. Macromedia.com...
    > Hi,.
    >
    > I am trying to accomplish something simple here, by accessing the parent company
    > value of the attribute of the node to a value of the child. I have the date given here,
    > but I
    > trying to find the name of the event of the day, including the name of
    > the
    > event is the attribute of date parent.
    >
    > I have the code here, as in the following, but I kept getting term #1009
    > not
    > set the error on line with parent() inside. Could someone please guide
    > me on
    > How do I fix this?
    >
    > Thanks in advance.
    >
    > Alice
    >
    > Excerpt from Actionscript:
    >
    > var resultC:XMLList;
    > resultC = searchResult... Book.schedule_item.date;
    > var resultD:XMLList;
    >
    > / * The following two lines kept giving me some bad mistakes #1009
    >
    > / / resultD = resultC.parent () .@type;
    > / / trace ("It's D" + resultD + "\n");
    >
    > / * End of error
    >
    > var resultC_collection:XMLListCollection = new
    > XMLListCollection (resultC.*);
    >
    > //Debug goal, print the string the result selected XML
    > trace ("this is the result:" + resultC);
    >
    > XML:
    >
    >
    > 20/03/2009
    > 22/03/2009
    >

    I think your problem is that resultC is an XMLList. Go to the parent company, you
    necessary to arrive at a SINGLE element in the list. Even if it is a list that contains
    a single element, which is not the same as a single element.

    Try

    Note that I do not book in your xml, so I doubt that is correct
    resultC is searchResult.child('book') .child ('schedule_item').child('date');.

    resultD resultC = [0] .attribute () .parent ('type');

    Note that the syntax that you used will break if no element has not one
    child or the attribute corresponding to your request, so I used the more verbose syntax.

    HTH;

    Amy

  • How to access the attributes of an object using TestStand. ?

    Hello

    I have a class named status in c# that has 2 data members. There is another class named parameter and it has functions that return objects of type status.

    I did the DLL from the parameter class. Then I added this class to NI TestStand and calls a function and this function returns an object of type status.

    Is there a way by which I can access the data members of the object returned in TestStand?

    Thanks in advance

    Yes, there is another alternative. If you state a value type (i.e. a struct in c#) then you can tell teststand to store it in a corresponding data structure TestStand rather than an object reference variable. It works even for the private fields in your structure. To do this:

    (1) first to report a type value and no matter what other changes are needed in your code to take account of this (value types are copied when it is passed by value to another method, if this isn't what you want you will have to pass by reference - i.e. the c# ref keyword).

    (2) recompile your assembly.

    (3) in the specification of module Panel TestStand .NET, you should now see a new button next to the expression for the return value of type status resembling TestStand data type icon. Press this button and it will prompt you to create a TestStand custom data type that matches the type .NET. Select this option to save the type in the type palette file MyTypes.ini. Just do it once. Once the type is in your palette file type MyTypes.ini it will be available then and you must only update if you change the type .NET.

    (4) create a local variable of the TestStand Custom data type instead of the object reference. Note that you can expand and see the properties under.

    (5) use this new local variable to store the return value of status. TestStand will be copy/update the properties of the variable to match those of the .NET structure that the method returns.

    NOTE: You can also simply store the fields of a struct in separate variables increase the return value of type status once it is a struct and specify a separate variable for each field instead of creating a custom data type TestStand.

    Don't forget that TestStand makes a copy when you store a struct that this way replaces the struct when this will not appear in the copy.

    Hope this helps,

    -Doug

  • How to access the attribute accessor in script expressions

    Hello

    I'm trying with validations of the entity at the attribute level. I have defined an accessor from view on the purpose of the entity. I write from validation script expression rule and it is necessary for me to access one of the attributes of the accessor of the view.

    How to get the value of the attribute accessor in the script expression.


    For example, I created the object of the entity for the employees table and created the accessor for job posting view. I need to get the jobs view accessor job description in the validation script expression. In the tokens of messages I can able to refer the accessor view using the following, but the same does not in the script expression.

    JobsAccessor.first (). JobDescription

    Thank you and best regards,

    S R Prasad

    Please check this post - where is the exact scenario specified by you:

    http://www.gebs.ro/blog/Oracle/ADF-BC-viewlink-viewlinkaccessor-and-Groovy/

    Thank you
    Nini

  • [FAD] How to access the attributes of node context menu?

    Hello

    I work with the component Tree ADF:

    < af:tree value = "#{bindings." Var TreeVO.treeModel}"="node">

    < f: facet name = "nodeStamp" >

    < af:outputText value = "#{node." Label"}

    ID = "NodeLabel don't" / >

    < / f: facet >

    < f: facet name = "contextMenu" >

    < af:popup id = "RemoteTreePopup" childCreation = "deferred."

    autoCancel = "disabled" >

    < af:menu text = "menu 1" id = "m1" >

    < af:iterator id = "i2".

    value = "#{bindings." CtxMenVO.collectionModel}.

    var = 'Elément' >

    < af:commandMenuItem text = ' #{element. " Label} / #{node. Label} '...

    What I expect: when I right click on a node (represented by the output text "node label", a context menu appears with 'element-label/clicked-node-label')

    What I see: the output of the node text is ok, but #{node. Label} has no value < af:commandMenuItem

    How can I recover the node.label of commandMenuItem?

    Hello

    setPropertyListener must go inside the popup.

    
        
    

    Also think about using contentDelivery = "lazyUncached" in the context menu

    Kind regards

    Ruben.

  • to access the attributes of scope memory using Java

    Hello guys, wonder if there is any way to access an attribute of scope of memory dynamically using java,.
    lets say I have a value stored in the application scope, #{applicationScope.MemberId}
    I get this value in a java class directly without linking the value of a hidden UI component?
    Thanks in advance

    Saidi.

    ADFContext.getCurrent().getApplicationScope()

    Check ADFContext (Oracle Fusion Middleware Java QAnywhere for Oracle ADF part)

    Dario

  • Hide elements based on other values of elements

    How to hide items (for example, af:commandButton) when I change the value of another element (e.g. af:selectOneChoice)

    Set the visible property for your button to an expression that is evaluated to true/false selection LOV from.
    don't forget to set the auto submit to true for your LOV and partial trigger for the button.

  • Get the attribute value of a def page table by using el expression.

    Hello

    Use Jdeveloper 11.1.2.0.0 and have a requirement like this for which a sample is created. Requirement is as follows...

    1. do you have a Taskflow with a readonly employee table.
    2. by clicking on a button called "itinerary" checks if the selected line, the attribute Manager id value = 200 then go to the first page on the other if the value attribute id manager is 200 then go to the second page.


    Through the def page, if it has the form, then we can access the attributes like #{data.view_FirstPageDef.ManagerId}. In the case of acquisition of the same attribute value from the table using the def page? is what I am unable to get...

    Come to the notion of routing using the router on Taskflow activity. But I am unable to get the selected row in a table of employee page def attribute value. Can anyone suggest on the same...


    Thank you and best regards,
    Olivier G

    On the router, right-click on its icon in the workflow and create a page definition. Then in the file def, add an iterator based on the same view of the table object in the first page, then add a value attribute that is mapped to the managerId in the iterator of the View object. Finally in the router, you can write EL expressions along the lines of #{bindings. ManagerId.inputValue = 200} or #{bindings. ManagerId.inputValue! = 200}.

    CM.

  • Value of f: attribute to access in my managed bean

    Dear all,

    I have the diffulty why this code returns a null value.

    In my case, I have a component of iterator and I put an attribute by each iteration
    <af:iterator value="#{bindings.employee.collectionModel}" var="row">
         <f:attribute name="empID" value="#{row.empID}"/>
         <af:outputText 
                        value="#{pageFlowScope.myBean.customValue}" id="ot1"/>
    </af:iterator>
    Now, in my managed bean I wanted to access the attribute I put during each iteration so that
    I could format the value of the output text.

    But I get null values instead.
    public class MyBean{
         public String getCustomValue(){
              String empID = (String)this.evaluateEL("#{empID}");
              //problem empID is always null????
         }
         private Object evaluateEL(String el) {
              FacesContext facesContext = FacesContext.getCurrentInstance();
              ELContext elContext = facesContext.getELContext();
              ExpressionFactory expressionFactory =
              facesContext.getApplication().getExpressionFactory();
              ValueExpression exp =
              expressionFactory.createValueExpression(elContext, el,
              Object.class);
              return exp.getValue(elContext);
         }
    }
    Any tips?

    But, at the end of the iteration we do not do anything so no need to worry about its value and infact scope of line is not valid in the iterator.
    The getCustomValue method is called for each iteration, so holds the current line instance.

    Jean Lou

  • to access the array elements

    Hello, everyone

    I am new to labview, & I need your help please,

    I did sample of a sinusoid, and the value of each sample is stored in a table (point by point).

    now I need to access the array by one element, because I want to subtract first element by others, one by one, in descending order, for example, if the first element is x, and other elements are y, y1, y2, y3, y4,... I mean x - y, x - y1, y2 x, x - y3... I need to do to have an account for a given period calculate the frequency.

    Please,

    I need someone to tell me, how to subtract one by one of the elements of paintings that I showed in the attachments below:

    Hello tinamoli,

    I have saved the VI for LabVIEW 8.0, removed the labels confusing (sorry, altenbach) and I added a small example for autoindexing.

    If you wire up a table in a loop for autoindexing has to be enabled by default. If you click right a tunnel there is an option to turn on/off indexing.

    I hope this helps.

    ULI

  • cannot access the rows of a table not nested element

    What Miss me? I'm under Oracle 12 c (12.1.0.1.0)

    CREATE TYPE dim_O AS OBJECT )

    dimension_id number

    label_en varchar2()300( )

    );

    CREATE TYPE dim_T AS TABLE OF dim_O;

    DECLARE

    dims_t dim_T

    START

    SELECT CAST(MULTISET( )) 

    SELECT  DIMENSION_ID LABEL_EN

    DE    DIMENSIONTABLE -actual physical table in oracle

       DIMENSION_ID IN (3001 3002 3003()

    ) AS dim_T) "dim_rec"

    BY dims_t

    DE    DOUBLE;

    FOR I IN dims_t. FIRST... dims_t. LAST LOOP

    DBMS_OUTPUT. Put_line() dims_t() I). dimension_id);

    END LOOP;

    -exit from the loop above is

    -3001

    -3002

    -3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE ( SELECT dimension_id FROM TABLE (dims_t) ( )

    Dimension_id SET = WHERE = dimension_id 3004 3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE ( SELECT dimension_id FROM TABLE (CAST (dims_t in dim_T () ) ( )

    Dimension_id SET = WHERE = dimension_id 3004 3003


    END;

    I'm trying to understand this example very simple, but to no avail.

    Can someone tell me why I get this error?

    Thank you all in advance for your time.

    Marc

    What Miss me? I'm under Oracle 12 c (12.1.0.1.0)

    CREATE TYPE dim_O () AS OBJECT

    number of dimension_id

    label_en varchar2 (300)

    );

    CREATE TYPE dim_T AS TABLE OF dim_O;

    DECLARE

    dims_t dim_T;

    BEGIN

    SELECT CAST (TYPE MULTISET)

    SELECT DIMENSION_ID, LABEL_EN

    OF DIMENSIONTABLE -actual physical table in oracle

    WHERE DIMENSION_ID IN (3001,3002,3003)

    () AS dim_T) 'dim_rec '.

    IN dims_t

    FROM DUAL;

    I'm IN dims_t.FIRST... dims_t.Last LOOP

    DBMS_OUTPUT. Put_line(dims_t (i) .dimension_id);

    END LOOP;

    -exit from the loop above is

    -3001

    -3002

    -3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE (SELECT dimension_id FROM TABLE (dims_t))

    SET dimension_id = dimension_id = 3003 3004 WHERE;

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE (SELECT dimension_id FROM TABLE (CAST (dims_t as dim_T)))

    SET dimension_id = dimension_id = 3003 3004 WHERE;

    END;

    I'm trying to understand this example very simple, but to no avail.

    Can someone tell me why I get this error?

    You get it because dims_t is an array of OBJECTS - not a table of scalars. But your SELECT statement returns scalar.

    There IS NO such object, named "dimension_id"; It is an ATTRIBUTE of the object DIM_O. DIMENSION_ID is a SCALAR which, as says the exception, is a "No nested table element; If you cannot select/Update lines of it.

    What you do is equivalent to the following:

    DECLARE

    dims_t dim_T;

    number of dim_id;

    dim_o design;

    BEGIN

    Design: = dim_o (3, 'ghi');

    SELECT DIM_O (DIM_ID, LABEL) BULK COLLECT INTO table DIMS_T (d_o);

    end;

    /

    ORA-06550: line 7, column 59:

    PL/SQL: ORA-22905: cannot access the rows of a table not nested element

    ORA-06550: line 7, column 1:

    PL/SQL: SQL statement ignored

    This SELECTION is trying to design it as a table when it's a SCALAR - so the same exception you get.

  • To access the elements of a cluster of LV-class

    Elements of a cluster are also accessible using nodes property. Therefore, it is possible to write a generic function to get the "content" (e.g. labels, variant values) of the clusters.

    But it's not possible for a "class pole", even, it is used in a class method. The property is not available here.

    How can I programmatic read items (attributes ' ") of a class (-cluster)?

    For example, I like to read the labels of all the elements / attributes in a class.

    Any idea?

    You can access the items in the class, but this approach is somehow "hackmac" and so I would not recommend you to do. However, it seems to be possible...

    In the attached approach, exchange of with the name of your control that contains the data of the class.

    hope this helps,

    Norbert

  • When trying to access the tab elements of remuneration for work of the buyer to get the error you encountered an unexpected error. Please contact the system administrator for assistance.

    When you try to access the tab to pay the buyer work center items get error:

    You have encountered an unexpected error. Please contact the system administrator for assistance. (Without any additional information)

    Please need help on how to solve this problem.

    Thank you

    Rambeau

    It seems bug-

    Please see - Center of the buyer: make an Exception when clicking on PAY tab ELEMENTS (Doc ID 1993378.1)

    Kind regards

    Kiran

  • Is it possible to access AMX element using the AMS item ID and then update the value of the AMX?

    I created a prototype - where I need to create a static Page AMX element. I have a bean that will have a method of UPDATING: the user interaction with the element AMX fires this UPDATE method, and the method will determine the value of another node AMX. The example is as follows

    <? XML version = "1.0" encoding = "UTF-8"? >

    "< amx:view xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    < amx:panelPage id = "pp1" >

    < amx:facet name = "header" >

    < amx:outputText value = "Header-XXX" id = "ot1" / >

    < / amx:facet >

    "< amx:selectOneChoice label = '1' id = 'soc1" value = ""valueChangeListener ="#{SolverLogic.Update1}" > "

    "< amx:selectItem label =" "id ="si667803"value ="-1"/ >"

    < amx:selectItem label = 'O1' id = 'si667804' value="667800.667803.667804"/ >

    < amx:selectItem label = "O2" id = "si667805" value="667800.667803.667805"/ >

    < amx:selectItem label = "O3" id = "si667806" value="667800.667803.667806"/ >

    < / amx:selectOneChoice >

    "< amx:selectOneChoice label ="2"id ="soc753865"value =" ">."

    "< amx:selectItem label =" "id ="si2"value ="-1"/ >"

    < amx:selectItem label = "Ø21" id = "si753866" value="667800.753865.753866"/ >

    < amx:selectItem label = "Ø22" id = "si753867" value="667800.753865.753867"/ >

    < amx:selectItem label = "O23" id = "si753868" value="667800.753865.753868"/ >

    < / amx:selectOneChoice >

    < / amx:panelPage >

    < / amx:view >

    When the user selects 'O1' - 'SolverLogic.Update1' bean - will calculate 'Ø21' must be selected. Is there a way to access the node AMX 'amx:selectOneChoice label is '2' ' - using the ID - id = "soc753865" sound, and then set the value as "value = 'Ø21' '"

    My requirement is that I don't need a DataController object, I have a binary file that contains the business logic, what I need is to create a static page and then use business logic to determine the result of user interaction and then update the user interface accordingly.

    Thank you

    Shailendra

    There is no label but value.

    You must have the below for the value of selectonechoice:

Maybe you are looking for