Problem getting text value of a node

Hi
this is my xml:
<servizio servizioID="WS-AS-14">
<mapping idEnte="-1" userName="administrator" name="ISTAT" nameTo="master">
     <category id="1.2.2.0" target="true" toId="01.05.01.011.000">
     <name>Descrizione1</name>
     </category>
     <category id="1.2.2.1" target="true" toId="01.05.01.011.001">
     <name>Descrizione2</name>
     </category>
     <category id="1.2.2.2" target="true" toId="01.05.01.011.002">
     <name>Descrizione3</name>
     </category>
</mapping>
</servizio>
I can get the value of the attributes id and toId of the Node category
But not the value of the Node name
This is the code:
Element rootElement = document.getDocumentElement();
NodeList nodeList = element.getElementsByTagName("category");
for(int i = 0; i < nodeList.getLength(); i++) {
Node category = nodeList.item(i);
NamedNodeMap categoryAttributes = category.getAttributes();
and the i get the 2 attributes
Node namelist = category.getFirstChild();
String name = namelist.getNodeName();
String value = namelist.getNodeValue();
but name is #text
and value is empty
what's wrong with my code?
thanks

up
thanks

Similar Messages

  • To Get the value of a node in a XML file which is outside the envelope

    Hi Everyone,
    I am uploading data in a XML file into Oracle tables. I am using oracle 9i release 2. How to get a value of a node outside the envelope.
    Here is my xml file.
    <Response>
    <TaskNo>14</TaskNor>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zonemws.com/Shipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Date>2011-06-03</Date>
    </GetServiceStatusResult>
    <Metadata>
    <Id>c9488a06</Id>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    This is the response xml we are getting from the supplier. I do want to store all the values in an oracle table, including TaskNo(14). TaskNo is the main value
    here. I am using dbms_xmlparser and dbms_xmldom in PL/SQL. I am able to get the values inside the envelope, but not the outside(taskno). It is not showing any errors. It is processing all
    other values. I Posted this in the XML DB section also. Please help me to solve this issue. Any help,tips and suggesstion will be highly appreciated. Thanks in advance
    --Vimal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I am providing some additional info like procedure, table structure and sample xml file so that you can get a clear idea about my problem and help me.
    My Procedure
    PROCEDURE xml_upload (
    p_directory IN VARCHAR2,
    p_server_directory IN VARCHAR2,
    p_filename IN VARCHAR2
    AS
    l_bfile BFILE;
    l_clob CLOB;
    l_parser DBMS_XMLPARSER.parser;
    l_doc DBMS_XMLDOM.domdocument;
    l_noderowset DBMS_XMLDOM.domnode;
    l_noderow DBMS_XMLDOM.domnode;
    l_nodecount NUMBER;
    l_Resultlist DBMS_XMLDOM.domnodelist;
    l_request_id VARCHAR2 (300);
    l_task_number NUMBER;
    l_tasknum_list DBMS_XMLDOM.domnodelist;
    l_service_list DBMS_XMLDOM.domnodelist;
    l_time_list     DBMS_XMLDOM.domnodelist;
    l_tasknode DBMS_XMLDOM.domnode;
    l_servicenode DBMS_XMLDOM.domnode;
    l_temp VARCHAR2 (1000);
    l_table_name VARCHAR2 (100);
    l_cmd_execution VARCHAR2 (1000);
    l_orig_file_with_path VARCHAR2 (1000);
    l_dest_file_with_path VARCHAR2 (1000);
    l_status custom.task_status.status%TYPE;
    l_time custom.task_status.timestamps%TYPE;
    l_rows NUMBER;
    l_message SYS.XMLTYPE;
    l_return_status NUMBER;
    TYPE tab_type IS TABLE OF custom.task_status%ROWTYPE;
    t_tab tab_type := tab_type ();
    PROCEDURE write_exception (
    p1_filename VARCHAR2,
    p_comments VARCHAR2,
    p_rows_created NUMBER
    IS
    BEGIN
    read_xml_file (p_directory, p_filename, l_message, l_return_status);
    -- Convert the xml to a clob
    l_clob := l_message.getclobval();
    -- Create a parser.
    l_parser := DBMS_XMLPARSER.newparser;
    -- Parse the document and create a new DOM document.
    DBMS_XMLPARSER.parseclob (l_parser, l_clob);
    l_doc := DBMS_XMLPARSER.getdocument (l_parser);
    -- Free any resources associated with the CLOB and Parser
    -- dbms_lob.freetemporary(v_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    l_noderowset :=
    DBMS_XMLDOM.item
    (DBMS_XMLDOM.getchildnodes (DBMS_XMLDOM.makenode (l_doc)),
    0
    l_nodecount :=
    DBMS_XMLDOM.getlength (DBMS_XMLDOM.getchildnodes (l_noderowset))
    - 1;
    t_tab.EXTEND;
    FOR i IN 0 .. l_nodecount
    LOOP
    l_noderow :=
    DBMS_XMLDOM.item (DBMS_XMLDOM.getchildnodes (l_noderowset), i);
    l_Resultlist :=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'RequestId'
    l_request_id :=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getfirstchild
    (DBMS_XMLDOM.item (l_Resultlist,
    0
    END LOOP;
    FOR i IN 0 .. l_nodecount
    LOOP
    l_noderow :=
    DBMS_XMLDOM.item (DBMS_XMLDOM.getchildnodes (l_noderowset), i);
    l_service_list:=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'Status'
    l_status:=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getfirstchild
    (DBMS_XMLDOM.item (l_service_list,
    0
    l_time_list:=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'Timestamp'
    l_time:=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getlastchild
    (DBMS_XMLDOM.item (l_time_list,
    0
    END LOOP;
    select
    extractvalue(column_value,'/Response/TaskNumber') into l_task_number
    from
    table(xmlsequence(xmltype('<Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    t_tab (t_tab.LAST).status:= l_status;
    t_tab (t_tab.LAST).timestamps:= l_time;
    t_tab (t_tab.LAST).amz_request_id:= l_request_id;
    t_tab (t_tab.LAST).tasknumber:= l_task_number;
    -- Insert data into the real Staging table from the table collection.
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO custom.task_status VALUES t_tab(i);
    COMMIT;
    DBMS_XMLDOM.freedocument (l_doc);
    DBMS_LOB.freetemporary (l_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    DBMS_XMLDOM.freedocument (l_doc);
    DBMS_LOB.freetemporary (l_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    DBMS_XMLDOM.freedocument (l_doc);
    END rrs_xml_upload;
    Sample File:
    <Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    Table: task_status
    tasknumber number,
    status varchar2(100),
    timestamps varchar2(100),
    requestid varchar2(100)
    all I want is to populate the data from xml file to the particulare table. I can do that with the above procedure.
    But In this below mentioned part of my procedure , I want to pass the file name instead of giving the entire content.
    select
    extractvalue(column_value,'/Response/TaskNumber') into l_task_number
    from
    table(xmlsequence(xmltype('<Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    Alex or any other oracle pl/sql experts please help me to solve this issue.
    FYI : I am using Oracle 9.2.0.8.0
    Thanks,
    Vimal..
    Edited by: Vimal on Jun 13, 2011 4:10 PM

  • Problem getting parameter  values at the service end point

    I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
    I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
    �     Service End Point Definition (in EJB)
    public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
    System.out.println(propertyName);
    System.out.println(PMSCode);
    System.out.println(streetNumPrefix);
    ........ taking printout of all the paramters
    �     This is my WSDL file
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="NMServiceServantInterface_setNewAddress">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
    <part name="String_4" type="xsd:string"/>
    <part name="int_5" type="xsd:int"/>
    <part name="String_6" type="xsd:string"/>
    <part name="int_7" type="xsd:int"/>
    <part name="String_8" type="xsd:string"/>
    <part name="String_9" type="xsd:string"/>
    <part name="String_10" type="xsd:string"/>
    <part name="String_11" type="xsd:string"/>
    <part name="String_12" type="xsd:string"/>
    <part name="String_13" type="xsd:string"/>
    <part name="String_14" type="xsd:string"/>
    <part name="String_15" type="xsd:string"/>
    <part name="String_16" type="xsd:string"/>
    <part name="String_17" type="xsd:string"/>
    <part name="String_18" type="xsd:string"/>
    <part name="int_19" type="xsd:int"/>
    <part name="int_20" type="xsd:int"/>
    <part name="String_21" type="xsd:string"/>
    <part name="String_22" type="xsd:string"/>
    <part name="int_23" type="xsd:int"/>
    <part name="int_24" type="xsd:int"/>
    <part name="String_25" type="xsd:string"/>
    <part name="String_26" type="xsd:string"/>
    <part name="String_27" type="xsd:string"/>
    <part name="int_28" type="xsd:int"/>
    <part name="int_29" type="xsd:int"/>
    <part name="int_30" type="xsd:int"/>
    <part name="String_31" type="xsd:string"/>
    <part name="String_32" type="xsd:string"/>
    <part name="int_33" type="xsd:int"/>
    <part name="int_34" type="xsd:int"/>
    <part name="String_35" type="xsd:string"/></message>
    <message name="NMServiceServantInterface_setNewAddressResponse">
    <part name="result" type="xsd:string"/></message>
    <portType name="NMServiceServantInterface">
    <operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
    <input message="tns:NMServiceServantInterface_setNewAddress"/>
    <output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
    <binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
    <operation name="setNewAddress">
    <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
    <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
    <soap:operation soapAction=""/></operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
    <service name="NMService">
    <port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
    <soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
    �     I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
    If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
    Thanks

    I just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
    This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy .

  • Problems getting selected values from HtmlSelectManyCheckbox

    Hello,
    I am having problems getting values via getSelectedValues() from my HtmlSelectManyCheckbox component. The method returns an object array but the values are the same as the initial selectItems property.
    JSP:
    <h:selectManyCheckbox id="checkBox"
        binding="#{userEditBean.manyCheckbox}"
        value="#{userEditBean.groupIds}"
        layout="pageDirection">
      <f:selectItems value="#{userEditBean.allGroups}"/>
    </h:selectManyCheckbox>
    <h:commandButton action="#{userEditBean.ok}"     value="OK"/>Bean:
    public class UserEditBean extends BaseBean {
        private HtmlSelectManyCheckbox manyCheckbox = new HtmlSelectManyCheckbox();
        private String[] groupIds= {};
        private List allGroups = new ArrayList();
        public String[] getGroupIds() {
                groupIds= backing.getSomeIds();
                return groupIds;
        public void setGroupIds(String[] ids) {
            this.groupIds= ids;
        public HtmlSelectManyCheckbox getManyCheckbox() {
            return manyCheckbox;
        public void setManyCheckbox(HtmlSelectManyCheckbox newC) {
            this.manyCheckbox = newC;
        public List getAllGroups() {
            allGroups = backing.getAllGroups();
            return allGroups;
        public void setAllGroups(List newList) {
            this.allGroups = newList;
        public String ok() {
            Object o = manyCheckbox.getSelectedValues();
        }The problem is, the getSelectedValues() returns the values from the initial state of the page. The is no mark of the changes made by the user. Any help will be appreciated
    Thanks,
    Matek

    Your approach is somewhat odd. The selected values are just reflected in the groupIds, but you're overridding it with backing.getSomeIds() each time when the getter is called.
    Here is a basic working example:<h:selectManyCheckbox value="#{myBean.selectedItems}">
        <f:selectItems value="#{myBean.selectItems}"/>
    </h:selectManyCheckbox>
    <h:commandButton value="submit" action="#{myBean.action}" />MyBeanprivate List<String> selectedItems;
    private List<SelectItem> selectItems;
    // + getters + setters
    // You can use initialization block or constructor to prepopulate the selectItems.
        selectItems = new ArrayList<SelectItem>();
    //or
    public MyBean() {
        selectItems = new ArrayList<SelectItem>();
    public void action() {
        // The selected items are reflected in selectedItems.
        for (String selectedItem : selectedItems) {
            System.out.println(selectedItem);
    }

  • How to get the value of a node content in XML Literal in BPEL 2.0?

    Hi!
    I have a Problem Build A Expression in activity allocation XML Literal one, I would like to help me ...
    Well, I have the same activity in BPEL 1.0 version and now is Different is BPEL 2.0,
    I have a Web Service < WSEjecutaComandos > Where to have a function Remote Commands That runs ,
    Inputs my Web Service: " numEquipo int , String [ ] comandos , int numCta , int publicar , int version ,  String fecha"
    The second argument is a string array type ..
    Now in my BPEL process , I make is the following assignment:
    <assign name="AssignCreaPath">
                        <copy>
                            <from>
                             <literal>
                                  <fnCRexecElement xmlns="http://servicios/">
                                       <numEquipo>2</numEquipo>
                                       <comandos>mkdir etl/entradas/mmkis/</comandos>
                                       <numCuenta>1</numCuenta>
                                       <publicar>0</publicar>
                                 </fnCRexecElement>
                            </literal>
                            </from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters</to>
                        </copy>
                        <copy>
                            <from>concat(ora:getContentAsString($InvokeClear_fnCRexec_InputVariable.parameters/comandos),$inputVariable.payload/client:fecha)</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/comandos</to>
                        </copy>
                        <copy>
                            <from>$InvokeVersion_fnGetVersionProcesoByFecha_OutputVariable.parameters/version</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/version</to>
                        </copy>
                        <copy>
                            <from>$inputVariable.payload/client:fecha</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/fecha</to>
                        </copy>
                    </assign>
    Well the conflict that I have is this,
    previously defined a assign with XML Fragment copied it to the payload to the input variable Web Service (WSEjecutaComandos),
    and the XML is copied in each of the variables ,
    Then concatenate input values ( I remarked in red) < comandos > with the value from "fecha" ( String) , and again copy Variable < comandos > and did not have any problems
    but now with the new BPEL 2.0, I do the same thing using now Literal XML ( that good!) but the option to concatenate (I remarked in red) and copied to the same variable ( I remarked in blue ), I mark the following error :
    I should know, I'm doing wrong That , or you need to make XPath Function That The Value They already have the variable < comandos> will concatenate fecha ,
    and is the final value for my entry my Web Service.
    must be defined as the type values array <comandos[i]>
    define the following activities before $InvokeClear_fnCRexec_InputVariable.parameters/comandos[1],
    but it seems that this BPEL 2.0 does not respect me as index brackets .
    Thank you...
    Cheers,

    thanks for your help , it served me!
    I need to get the value of XMLNodeList <comandos> to concatenate the date.
    Attempt to XPath function ( ora:getContentAsString(NodeList elementAsNodeList)), but returns me a String, but a nodoXML.
    Cheers,
    Maby

  • Get the value from another node.

    Hi, expert
    In the component BT131I_SLS , I create a enhanced attribute in the node: BT131I_SLS/Details BTADMINI
    Then i define the GET-V method to create a search help for the attribute.
    Now , i want to pass a BP number to the search help function to filter the data.
    We need to get the BP number as below:
    When create a order, we input the product id ,
    then there will be a popup window , we can choose  a vendor in the window.
    The vendor number is the value which we want to pass to the search help.
    How can i do that ?
    Thanks.
    Oliver.

    Hi , expert
    Can i use the 'get_related_entities' to get the value I need?
    I think maybe i can use the method to get the value from another view which is not in my component.
    Now I write codes in the GET-V method, as below:
    method GET_V_ZZZFLD000011.
      DATA:
        LS_MAP    TYPE IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING,
        LT_INMAP  TYPE IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB,
        LT_OUTMAP TYPE IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB.
      DATA: LV_PARTNER_NO TYPE CRMT_PARTNER_NUMBER.
      data: lr_current TYPE REF TO if_bol_bo_property_access,
            lr_entity  TYPE REF TO cl_crm_bol_entity,
            lr_col     TYPE REF TO if_bol_bo_col,
            value      TYPE string.
      lr_entity ?= me->collection_wrapper->get_current( ).
      lr_col = lr_entity->get_related_entities( iv_relation_name = 'Relation_Name' ).
      lr_current = lr_col->get_current( ).
    * value =
      LS_MAP-CONTEXT_ATTR = 'EXT.ZZZFLD000011'.
      LS_MAP-F4_ATTR      = 'LGORT'.
      APPEND LS_MAP TO: LT_OUTMAP.
    *  LS_MAP-CONTEXT_ATTR = 'EXT.ZZZFLD000011'.
    *  LS_MAP-F4_ATTR      = 'LANGU'.
    *  APPEND LS_MAP TO LT_INMAP.
      IF SY-SUBRC  = 0.
      ENDIF.
      CREATE OBJECT RV_VALUEHELP_DESCRIPTOR
        TYPE
          CL_BSP_WD_VALUEHELP_F4DESCR
        EXPORTING
          IV_HELP_ID                  = 'ZHELP_ZSAKCDD'
    *      IV_HELP_ID_KIND             = IF_BSP_WD_VALUEHELP_F4DESCR=>HELP_ID_KIND_COMP
          IV_HELP_ID_KIND             = IF_BSP_WD_VALUEHELP_F4DESCR=>HELP_ID_KIND_NAME
          IV_INPUT_MAPPING            = LT_INMAP
          IV_OUTPUT_MAPPING           = LT_OUTMAP
          iv_trigger_submit           = abap_true
    *      IV_F4TITLE                  = ' '"#    EC NOTEXT
    endmethod.
    But i don't know the Relation_Name which i can get the vender's information.
    Another question : i want to trigger the code 'get_related_entities' when i click the search help,
                                   How can i do that ?
    Thanks.
    Oliver.
    Edited by: oliver.yang on Aug 7, 2009 5:56 AM

  • Problem getting arraylist values from request

    Hi All,
    I am trying to display the results of a search request.
    In the jsp page when I add a scriplet and display the code I get the values else it returns empty as true.Any help is appreciated.
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
    <head>
         <%@ include file="/includes/header.jsp"%>
         <title>Research Results</title>
    </head>
    <body>
    <div class="ui-widget  ui-widget-content">
        <%  
        ArrayList<Research> research = (ArrayList<Research>) request.getAttribute("ResearchResults");
         Iterator iterator = research.iterator();
              while(iterator.hasNext()){
              Research r = (Research) iterator.next();
              out.println("Result Here"+r.getRequesterID());
              out.println("Result Here"+r.getStatus());
        %> 
         <form>
         <c:choose>
         <c:when test='${not empty param.ResearchResults}'>
         <table cellspacing="0" cellpadding="0" id="research" class="sortable">
         <h2>RESEARCH REQUESTS</h2>
                   <tr>
                   <th><a href="#">RESEARCH ID</a></th>
                   <th><a href="#">REQUESTOR NAME</a></th>
                   <th><a href="#">DUE DATE</a></th>
                   <th><a href="#">REQUEST DATE</a></th>
                   <th><a href="#">CLIENT</a></th>
                   <th><a href="#">STATUS</a></th>
                   <th><a href="#">PRIORITY</a></th>
                   </tr>
              <c:forEach var="row" items="${param.ResearchResults}">
                        <tr title="">
                             <td id="researchID">${row.RESEARCH_ID}</td>
                             <td>${row.REQUESTER_FNAME}  ${row.REQUESTER_LNAME}</td>
                             <td><fmt:formatDate pattern="MM/dd/yyyy" value="${row.DUE_DATE}"/></td>
                             <td><fmt:formatDate pattern="MM/dd/yyyy" value="${row.CREATED_DATE}"/></td>
                             <td>${row.CLIENT}</td>
                             <td>
                             <c:choose>
                               <c:when test="${row.STATUS=='10'}">New Request</c:when>
                               <c:when test="${row.STATUS=='20'}">In Progress</c:when>
                               <c:when test="${row.STATUS=='30'}">Completed</c:when>
                              </c:choose>
                             </td>
                             <td>
                             <c:choose>
                               <c:when test="${row.PRIORITY=='3'}">Medium</c:when>
                               <c:when test="${row.PRIORITY=='2'}">High</c:when>
                               <c:when test="${row.PRIORITY=='1'}">Urgent</c:when>
                              </c:choose>
                             </td>
                             </tr>
              </c:forEach>
         </table>
         </c:when>
         <c:otherwise>
         <div class="ui-state-highlight ui-corner-all">
                   <p><b>No results Found. Please try again with a different search criteria!</b> </p>
              </div>
         </c:otherwise>
         </c:choose>
         </form>
              <%@ include file="/includes/footer.jsp"%>
         </div>
         </body>
    </html>

    What is ResearchResults?
    Is it a request parameter or is it a request attribute?
    Parameters and attributes are two different things.
    Request parameters: the values submitted from the form. Always String.
    Request attributes: objects stored into scope by your code.
    They are also accessed slightly differently in EL
    java syntax == EL syntax
    request.getParameter("myparameter") == ${param.myparameter}
    request.getAttribute("myAttribute") == ${requestScope.myAttribute}
    You are referencing the attribute in your scriptlet code, but the parameter in your JSTL/EL code.
    Which should it be?
    cheers,
    evnafets

  • Problems getting text content of text node?

    Hi all,
    I am currently somewhat puzzled why one of the simplest parts of my code doesn't work. I am trying to get the text content of a text node (XmlValue.getNodeType() correctly returns TEXT_NODE) in Java, but what I get is always the text of the entire document retrieved from the database (no matter what text node I consult in the entire document!). Is this expected behaviour? The method I am using to retrieve the data is XmlValue.getNodeValue(), but playing around with other functions didn't show any success either.
    So my question is: what am I doing wrong here? I hope someone in here can help me with my rather stupid problem :-)
    Thanks for your help,
    Alex

    Hello Rucong,
    thanks for your quick answer. I am sorry for the delay - I was away for a couple of days.
    I boiled down my code to a simple example - however can't believe it's the query itself (since it's really basic). But maybe you see something I am missing?
    Here is my sample code that exhibits this behaviour:
              XmlManagerConfig managerConfig = new XmlManagerConfig();
              EnvironmentConfig envConfig = new EnvironmentConfig();
              envConfig.setAllowCreate(false);
              envConfig.setInitializeCache(true);
              envConfig.setInitializeLocking(false);
              envConfig.setInitializeLogging(true);
              envConfig.setTransactional(false);
              envConfig.setErrorStream(System.out);
              Environment env = new Environment(new File("D:\\dbhome"), envConfig);
              XmlManager manager = new XmlManager(env, managerConfig);
              XmlManager.setLogLevel(XmlManager.LEVEL_ALL, true);
              XmlManager.setLogCategory(XmlManager.CATEGORY_ALL, true);
              XmlContainerConfig containerConfig = new XmlContainerConfig();
              containerConfig.setAllowCreate(true);
              XmlContainer container = manager.openContainer("mpeg7samples.dbxml", containerConfig);
              XmlQueryContext context = container.getManager().createQueryContext();
              String query = "for $a in collection('mpeg7samples.dbxml') return $a";
              XmlResults result = container.getManager().query(query, context);
              while (result.hasNext()) {
                   XmlValue v = result.next();
                   if (v.getNodeType() != XmlValue.DOCUMENT_NODE)
                        throw new Exception();
                   v = v.getFirstChild();
                   if (v.getNodeType() != XmlValue.TEXT_NODE)
                        throw new Exception();
                   System.out.println(v.getNodeValue());
                   break;
              container.close();
              manager.close();
    This code executes a simple query and then dumps the first text node of the first retrieved document. As stated before the System.out.println() call dumps the text of the entire document (including <?xml...?> at the beginning and so on) though.
    Any ideas?
    Thanks in advance for your help,
    Alex

  • PL/SQL XML Parser (problem getting text of a node)

    I am trying to get the contents of an ELEMENT (node with a CDATA section) using xmldom.getNodeValue(). However, it seems that there is a MAXIMUM number of characters that I can get back.
    I think I've found a work-around using xmldom.writeToBuffer() which seems to write all of the CDATA contents to a VARCHAR2 variable. Now my problem is that it is using strings like '&#60' and '&#38'. I recognize these strings as being "internal representations of '<' and '&' respectively. I'd not have to replace every occurence of these types of strings with the ASCII equivalent -especially since I don't know all of the possible '&#nn' strings that may crop up.
    Help!

    The use of "//" or "\\" appears to be a bug in JServer. It has
    been filed. You should not specify the path as a shared
    directory as a workaround.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Andre (guest) wrote:
    : Oracle 8.1.5 database on NT
    : When i try running the example with command:
    : SQL*Plus> exec domsample
    : ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
    : I get the following error:
    : ERROR at line 1:
    : ORA-20100: Error occurred while parsing:
    : //ORACLE/xml_tmp/err.txt
    : ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
    : ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
    : ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
    : ORA-06512: at line 1
    : If i use backward-slashes '\' which should be OK for NT i get:
    : ORA-20100: Error occurred while parsing:
    : \\ORACLE\xml_tmp/err.txt
    : I tried using a directory (create directory ...) but this
    : results in the same error.
    : Thus anyone now how it should be done?
    : Thanks
    null

  • How to get attribute value of a node

    Hi experts
    I have a mapped node in my view context from component controller context. This node consists of 2 value attributes inside
    Example:
    NODE1             -
    > Cardinality 1..1, seleciton 1..1
       -- x_date         -
    > type DATS
       -- x_years        -
    > dec3
    How do I get the attribute value attr1 and attr2 ??
    Here is my code in my view method
      DATA: lr_node_info TYPE REF TO if_wd_context_node_info,
            l_date       TYPE dats,
            l_xyears     TYPE i.
      lr_node_info = wd_context->get_node_info( ).
      lr_node_info = lr_node_info->get_child_node('NODE1').
       l_date       = lr_node_info->get_attribute( name = 'X_DATE' ).
       l_xyears     = lr_node_info->get_attribute( name = 'X_YEARS' ).
    It does not seems to work since it says < the result type of the function method can not be converted into the result type L_DATE>
    I try to understand why but not sucessful, please help and thank you for your kindness

    Hi Dean,
    Regading uour problem of reading the attributes value of the context node, you have to  use the code wizard. that ia avaliable on the top toolbar when you are inside the View Method
    There is option to read context  select that radio button option and then thru F4 help
    if you can select the node then Code is automatically generated with variable declaration.!!
    Like this :
      DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
        DATA lo_el_node1 TYPE REF TO if_wd_context_element.
        DATA ls_node1 TYPE wd_this->element_node1.
        DATA lv_x_date LIKE ls_node1-x_date.
        DATA lv_x_year LIKE ls_node1-x_year.   
      navigate from <CONTEXT> to <NODE1> via lead selection
        lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
      get element via lead selection
        lo_el_node1 = lo_nd_node1->get_element(  ).
      get all declared attributes
        lo_el_node1->get_static_attributes(
          IMPORTING
            static_attributes = ls_node1 ).
        lv_x_date = ls_node1-x_date.
        lv_x_date = ls_noe1-x_year.
    if you can select the attribute then Code is automatically generated with variable declaration.!!
    DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
      DATA lo_el_node1 TYPE REF TO if_wd_context_element.
      DATA ls_node1 TYPE wd_this->element_node1.
      DATA lv_x_date LIKE ls_node1-x_date.
    navigate from <CONTEXT> to <NODE1> via lead selection
      lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
    get element via lead selection
      lo_el_node1 = lo_nd_node1->get_element(  ).
    get single attribute
      lo_el_node1->get_attribute(
        EXPORTING
          name =  `X_DATE`
        IMPORTING
          value = lv_x_date ).
    Hopes this will helps you.
    Regard
    Manoj Kumar

  • CS4 Problem getting text from Illustrator over to Photoshop.

    What a mess and why is  this so difficult. I finally figured out how to create my text on a curve and leave the letters going straight up and down. So I am trying to paste or drag and drop over to my bottle in Photoshop but what happens is that the text is in a clear area But then it creates a white box around that so I can't see my bottle. I have a lot of bottles I need to change the names on and no time to reshoot and knock them all out. Help please!!! I am going to try and attach images again but when I tried in  the Illustrator forum... the load button was greyed out.
    Now on top of it, I am trying to create an image to attach... and it's doing even more crazy stuff. I created an image with the full bottle on L and what is supposed to be the full bottle on the R = only instead for some reason.... my text is coming over from Illustrator with an additional white box blocking most my bottle... then on top of it.... I tried to just type in what was going on and then if I rasterize the text OR I just try to save.... it created a new black box blocking the bottom 1/2... now what do I do??? This is really a mess!!!!

    OK. The bottle on the L is what the bottle is supposed to look like.... minus the black box on the bottom. The L bottle is placed there in photoshop just to show what it is supposed to look like. Then the other layer had the bottle on the R or what is supposed to be the full bottle that I am trying to get my Eyelash Recovery text onto that one on that layer.
    The bottle on the R is the problem. The white box is the entire area around the small area of the bottle being shown. Yes, trying to bring just the text Eyelash Recovery over from Illustrator = it created the white box all by itself. (Create Outlines did not help at all)
    Note. I created the words Eyelash Recovery in text on a circle in Illustrator and then tried to drag and drop AND I tried to copy/paste into Illustrato = both ways. Both failed and created everything that is white around the R bottle that only shows the small area of the bottle. Anything around the small window of the bottle = which is actually a transparent area around the text Eyelash Recovery that allows the bottle on the L to show thru. So it came over as a small area of transparent window with the text in it (not centered as you can see) AND a white box around that window that I could not get rid of.
    But then, for some reason, it then also wanted to created the black blox on bottom out of the clear blue = where that came from I do not know.
    So I created the text Eyelash Recovery in Illustrator on the oval and placed it in position on the oval using the text on path tool. I then used the type > skew to get the text to bet straight up and down instead of curving into the oval. Then I tried 2 ways. 1 was to copy/paste into Photoshop on top of the bottle and the other was to drag and drop. It wanted to place it as pixels. So I allowed it to paste as pixels. And I allowed it to apply. In the layers palette however, it showed as a vector smart object = ???
    Then I tried to rasterize that layer which now said it wanted to rasterize the smart object (which I did not 1. place OR 2. drag and drop as a smart object).
    For some reason, instead of only coming over as the Eyelash Recovery text, it came over with just a small transparent window (which you can see on the L side above AND it created the rest as a white box around that that obliterated the rest of the image. Yes, I could move the Eyelash Recovery text and the transparent window around to show diff. parts of the bottle but only this amount as seen above. But I could not get rid of the white around the transparent window to see the bottle below in full and to place my Eyelash Recovery text.
    Then on top of it... for some reason, when I rasterized that layer, it created the black box you see on the bottom of the image above and there was no way to get rid of either the white area OR the black box area at bottom
    A mess?? Yes.

  • Problem getting krUFS values from SunMC 4.0 on Sunfire X2100

    If I use the snmpget command to ask the SunMC agent for the krUFS oids I'm interested in (Mount point, SystemSize, PctUsedSpace), I get no error, but I get no data either (i.e. returned value is "" for all).
    I'm able to get this data for T1000 and Sun Blade 2500's w/ no problem.

    Hi Arutherford,
    Arutherford wrote:
    If I use the snmpget command to ask the SunMC agent for the krUFS oids I'm interested in (Mount point, SystemSize, PctUsedSpace), I get no error, but I get no data either (i.e. returned value is "" for all).
    I'm able to get this data for T1000 and Sun Blade 2500's w/ no problem.So, you're getting numbers from SPARC systems, but not x86? Is it possible some of your systems have the "Kernel Reader" module and other have "Kernel Reader Simple" loaded? Or is the X2100 maybe using ZFS (which SunMC doesn't track, you'd need SystemMonitor)
    Regards,
    [email protected]
    http://www.HalcyonInc.com

  • HOW TO GET THE VALUE OF A NODE IN XMLDOC?

    i have an xml doc like this:
    <FUSIONHUB>
    <INFO>
    <COMPANY_ID>A001</COMPANY_ID>
    </INFO>
    </FUSIONHUB>
    HOW TO RETRIEVE THE VALUE A001?
    I HAVE USED NODE.getNodevalue() method but it returned null instead of A001.
    can anybody please answer ?
    waitng for replies immediately.
    null

    Hi,
    You need to get the child node of the company_id node and then get the node value.
    The value A001 is stored in a textnode under the node company_id.
    Thanks,
    Oracle XML Team

  • JTree - need to get the value of a node at a specific node in the tree

    For Example here is a tree:
    Root
    -Item1
    A
    B
    C
    -Item2
    A
    B
    C
    Scenario: Somebody selects B in Item2 from the tree and drags it to a JList. Need to be able to tell the JList that the B came from Item2 and not Item1. So how do I get the Item1, Item2 value? Thanks in advance for all your help.
    Here is the code I am working with...so I have a TreeSelectionEvent(e), a DefaultMutableTreeNode(node) and my JTree(mainTree)
    public void valueChanged(TreeSelectionEvent e) {
    DefaultMutableTreeNode node = (DefaultMutableTreeNode) mainTree.getLastSelectedPathComponent();
    getChildren(node);

    public void valueChanged(TreeSelectionEvent e) {
       javax.swing.tree.TreePath path = e.getPath();
       ...Then use path.getLastPathComponent() and path.getParentPath().getLastPathComponent() methods.
    Tristan

  • 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

Maybe you are looking for

  • In AP3 How To Make One Area Same Color As Another?

    Sorry for dumb newbie question but I am not familiar with AP3 editing tools yet....just loaded it last night. How do I set a color reference point on the photo (source color) and then apply that same color selectively to another area of the photo? th

  • Posting data through Idoc conf21

    Hi all, I never used an Idoc I need to post data into SAP using the Idoc CONF21, can any one suggest me how to proceed. I have the data in internal table I need to pass this to Idoc in order to update SAP. Thanx in advance. Parvez.

  • DAB radio

    hi why is it i cant listen to dab radio on my n8 it says i must purchase head phones but the phone came with these many thanks for any help

  • What is a "sync UI Handler" error mean?

    What does a "sync UI handler" error mean? This happens when I try to sync with my PC in itunes. It tells me there are three conflicts that occured when I synced, 2 calendar and 1 music.

  • Report Security - Important

    We are planning to use Oracle reports as our reporting system on the web. I have a question on integration with our existing web application. I would like to use a single signon which will be used to access the existing application and oracle reports