Static lookup lists:read data from a Java *.properties file

Hi
i need to make static lookup lists i am using read data from a Java *.properties file
i am using the Class "PropertyFileBasedLookupViewObjectImpl" that wrote by Steve Muench in ToyStore.
but i need to use the default language for that i update the loadDataFromPropertiesFile()
method to find the correct properties file
String temp=Locale.getDefault().getLanguage();
String propertyFile =
getViewDef().getFullName().replace('.', '/')+"_"+temp+ ".properties";
the problem:
For English(TEST_en.properties) it is good and working
For Arabic(TEST_ar.properties) read from correct file _ar.properties
but the dispaly character is wrong
When Debug
In the File 1=دمشق
In debug 1=/u32423

Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

Similar Messages

  • View Object to read data from a java file

    Hi,
    I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
    For one of my view objects , I want the data to be read from a java file which exposes some method to return a collection.
    I cannot use a static view object in this case.
    Please suggest the best way to implement this requirement.Basically build a view object that should read data from a java file.
    Thanks,
    Praveen

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • Best way to browse and read data from a lot of files?

    Hi All,
    I am trying to read tags from music files. Currently I'm listing all the files and then reading through the tags, as below:
    List<File> result = new ArrayList<File>();
    FilenameFilter mp3filter = new FilenameFilter() {
         public boolean accept(File dir, String name) {
              return name.endsWith(".mp3");
    FilenameFilter wmafilter = new FilenameFilter() {
         public boolean accept(File dir, String name) {
              return name.endsWith(".wma");
    FileFilter dirFilter = new FileFilter() {
         public boolean accept(File file) {
              return file.isDirectory();
    File[] dirList = aStartingDir.listFiles(dirFilter);
    File[] mp3files = aStartingDir.listFiles(mp3filter);
    File[] wmafiles = aStartingDir.listFiles(wmafilter);
    List<File> filesDirs = Arrays.asList(dirList);
    List<File> filesMp3 = Arrays.asList(mp3files);
    List<File> filesWma = Arrays.asList(wmafiles);
    for (File file : filesMp3) {
         result.add(file);
    for (File file : filesWma) {
         result.add(file);
    for (File file : filesDirs) {
         List<File> deeperList = getFileListing(file);
         result.addAll(deeperList);
    }and then read the files in a for loop through the list.
    Is there a better way to do the same?

    Well, you could optimize that just a little bit by only calling listFiles once with a filter that would accept directories, wmas, and mp3s all in one go. Then you could iterate through the results and separate them into the three categories after you had the complete recursive directory listing. That may be faster. But your OS will likely cache the results of the directory listing, thus minimizing the effort of your current approach. But honestly, no... you need the headers from every file, so you'll need to find each file and then check the headers.
    If you want, you can cache the results somewhere for future reference. Are you concerned about performance or some such?

  • Reading data from Hashtable in another file

    how do i read the data from Hashtable which is created in another file. The file which creates hashtable is continuously running , and i want to read the content of the hash table into another file. Both the file exist in same machine.
    Help needed.
    Ancitipated Thanks

    Then you mean "class" or "object", not "file". Yes, you see the details of these classes in the source code files, and the compiled classes are kept in files, but programmers don't think of the files, they think of the objects running in the JVM. By calling them "files" you're causing confusion.
    Anyway, multiple threads can access a hashtable, which is synchronized apparently. So that alone shouldn't be a problem. If you have one object adding to a hashtable while another is reading its contents via an iterator, that could cause ConcurrentModificationExceptions.

  • How to read data from PDF and HTML  file

    I have got solution to read text form .txt file but did'nt get code for PDF and HTML.
    I dont want to convert PDF to txt.
    Please help me ...

    ah crap i could have guessed there would be a crosspost only the forum in where the crosspost is made is abit funny
    To OP: DO NOT CROSSPOST
    http://forum.java.sun.com/thread.jspa?threadID=5267875&tstart=0

  • Read datas from HTML or XML file in LabView

    Hi all,
    I need help in the following. I need to read the measurement results from test report into LabView. Test report format is HTML or XML. Please give me some advice on how to do this?
    Thank you.
    Mik

    A quick search through the forums will point you to this thread which has some excellent advice and a effecient parser vi
    Jeff

  • JavaConsole Error: Problem reading data from server

    HI All
    We are getting this error on java console on a page:
      Error: Problem reading data from Server - Java.Security.AccessControlException:access denied (java.util.PropertyPermission http.strictpostredirect Read)
    In this page we are not firing  a SQL Query of huge data.
    Any suggestions on this why it is happening?
    Thanks
    Manisha

    Manisha,
    I think JVM(Java Virtual Machine) is trying to access something at network level and it cant able to find it.Or any new patches of java is installed.
    Or may be due to IIS or Applet,Don't know exactly.
    You can find some answers in below links:
    http://java.sun.com/j2se/1.4.2/docs/api/java/security/AccessControlException.html
    http://www.webdeveloper.com/forum/archive/index.php/t-46358.html
    -Suresh

  • Read lines from more than 1 file of different file extensions, extract the data and output to screen

    Hi,
    I am trying to read data from more than one file at once. The files are different types e.g. one is a text file one is an xml file like so, StudentInformation.txt, CollegeInformation.xml. The files are all stored in one place, in this case on the D drive of
    a local computer. I am trying to locate any files in the D drive with a file extension of .txt or of .xml (there may be more than two of these files in the future, so I'm trying to allow for that). Then I want to open all of these files, extract the information
    and output all the information in one display window. I want all the information from these two or more files to be displayed together in the display window.
    Here is the code so far. It is throwing up errors.
            //Load from txt or xml files
            private void btnLoad_Click(object sender, RoutedEventArgs e)
                    IEnumerable<string> fileContents = Directory.EnumerateFiles("D:\\", "*.*", SearchOption.TopDirectoryOnly)
                    .Select(x => new FileInfo(x))
                    .Where(x => x.Extension == ".xml" || x.Extension == ".txt")
                    .Select(file => ParseFile(file));}
                    private string ParseFile(FileInfo file)
                        try
                            using (StreamReader sr = new StreamReader(file.FullName))
                                string line;
                                while ((line = sr.ReadLine()) != null)
                                    //Logic here to determine if this is the correct file and append accordingly
                                    lbDisplay.Items.Add(line);
                                return line;
                        catch (Exception ex)
                            // Let the user know what went wrong
                            MessageBox.Show("The file could not be read: ");
                            MessageBox.Show(ex.Message);
    The error it throws up is:
    Error 1
    'BookList.MainWindow.ParseFile(System.IO.FileInfo)': not all code paths return a value

    This is the Small Basic programming language so moving to a C# forum.
    But you need all paths to return a value, including if an exception is called and it jumps to the catch, perhaps just:
    // Let the user know what went wrong
    MessageBox.Show("The file could not be read: ");
    MessageBox.Show(ex.Message);
    return "";

  • Java properties file

    Hi ,
    I am using trying to write data to a java properties file , by using the setProperty method and somehow the order of the data is not by the order of inserting it ,Is there a way to use the setProperty method and still keep the order of data in the file after storing it.
    Thanks.

    Eddie404 wrote:
    I am using trying to write data to a java properties file , by using the setProperty method and somehow the order of the data is not by the order of inserting it ,Is there a way to use the setProperty method and still keep the order of data in the file after storing it.It shouldn't matter what order the Properties class uses to write its data. If it does, you aren't doing something right.
    If the order matters, that suggests that somebody is responsible for maintaining the properties via a text editor, or something like that. In which case you shouldn't be using a Properties object which modifies the property file. But as soon as you start having two different processes to maintain the file, you're going to run into trouble. So simplify your life and stop doing that. Either maintain it through the program, or through the text editor, but not both ways.

  • Possible to read data from a web browser into java?

    Is it possible to read data from a web browser such as IE or Mozilla into a java applet for use and manipulation? If it is, could someone please post some documentation I could look at or a snip-it of code I could use? Thanks.

    This will read the content from a site:
    import java.net.*;
    import java.io.*;
    class Test {
         public static void main(String[] argv) throws Exception {
              URL u = new URL("http://www.google.com");
              URLConnection uc = u.openConnection();
              BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
              String text;
              while( (text = br.readLine()) != null ) {
                   System.out.println(text);
    }

  • Error reading data from static cursor cache.

    Hi,
    Does anyone know what causes this error below. It just started happening out of the blue. I'm running Apache Tomcat 4.1 on Win 2000 server with MS SQL Server 2000 database.
    Error:
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error reading data from static cursor cache.
    Thanks,
    TR

    hi,
    i had a similar sort of error, something along the lines of "error setting up static cursor cache" using the SQL JDBC drivers on Win2K. i deleted the file entries in the TEMP folder of c:\documents and settings\<user>\Local Settings\TEMP and everything was cool after it. i'm not sure what the exact issue is (probably something like maximum folder size had been reached). i ran the FileMon utility from www.sysinternals.com and it reported a DISK_FULL error on a temporary file being read by the process. to cut a long story short, everything is NOW cool.
    cheer,
    dara

  • Read data from MDM For Lookup and Flat table using MDM ABAP API

    Hi,
    I have requriment to read data from MDM from FLAT and Lookup table using MDM ABAP API. My design  is like this ,
    I have one ITEMS (Main table in MDM) and inside that i have one Lookup flat table ITEM_TYPE , my requriment is to read Item number and its related Item type.
    From ABAP.
    Please help if any body has any idea.
    Regards,
    Shyam

    HI Guys,
    I found my solution by myself. Below is the solution , hope this will help others:-
    Retrieve data from MDM  using MDM ABAP API.
    Step- 1. Create structure in SAP with the same name as that of MDM field code for MDM Main table.
    Step-2. Create another structure in SAP having all  lookup fields of MDM , fieldname in ECC must be same as that of MDM field
    code.
    Step-3.Create structure in SAP for  individual lookup field(Single Field only)   with the same name as MDM Field code.
    Step-4.
    DATA: IT_QUERY            TYPE STANDARD TABLE OF MDM_QUERY,  "MDM_QUERY_TABLE,
          WA_QUERY            TYPE  MDM_QUERY,
          WA_CDT_TEXT         TYPE  MDM_CDT_TEXT,
          IT_RESULT_SET_KEY   TYPE  MDM_SEARCH_RESULT_TABLE,
          WA_RESULT_SET_KEY   TYPE  MDM_SEARCH_RESULT,
          WA_STRING           TYPE  STRING.
    DATA:<Internal table> TYPE STANDARD TABLE OF <SAP Str Having all LOOKup Fields>    
    DATA: :<Internal table>TYPE STANDARD TABLE OF <SAP Str one LOOKup field>,
         <Workarea> LIKE LINE OF :<Internal table>.
    *PASS LOGICAL OBJECT NAME.
    V_LOG_OBJECT_NAME = 'Logical object name defined in Customization'.
    Define logon language, country & region for server
    WA_LANGUAGE-LANGUAGE = 'eng'.
    WA_LANGUAGE-COUNTRY = 'US'.
    WA_LANGUAGE-REGION = 'USA'.
    TRY.
        CREATE OBJECT LR_API
          EXPORTING
            IV_LOG_OBJECT_NAME = V_LOG_OBJECT_NAME.
    ENDTRY.
    CONNECT to repository. Apply particular logon language info
    CALL METHOD LR_API->MO_ACCESSOR->CONNECT
      EXPORTING
        IS_REPOSITORY_LANGUAGE = WA_LANGUAGE.
    *NOW PASS ITEM NO AND GET KEY FROM MDM.
    CLEAR WA_QUERY.
    WA_QUERY-PARAMETER_CODE  = <MDM FIELD CODE>. "Field code
    WA_QUERY-OPERATOR        = 'EQ'. "Contains
    WA_QUERY-DIMENSION_TYPE  = 1. "Field search
    WA_QUERY-CONSTRAINT_TYPE = 8. "Text search
    WA_STRING                = <Field Value>.
    GET REFERENCE OF WA_STRING INTO WA_QUERY-VALUE_LOW.
    APPEND WA_QUERY TO IT_QUERY.
    CLEAR WA_QUERY.
    *PASS ITEM NUMBER AND GET RELATED KEY FROM MDM.
    TRY.
        CALL METHOD LR_API->MO_CORE_SERVICE->QUERY
          EXPORTING
            IV_OBJECT_TYPE_CODE = <MDM Main Table>
            IT_QUERY            = IT_QUERY
          IMPORTING
            ET_RESULT_SET       = IT_RESULT_SET_KEY.
      CATCH CX_MDM_COMMUNICATION_FAILURE .
      CATCH CX_MDM_KERNEL .
      CATCH CX_MDM_NOT_SUPPORTED .
      CATCH CX_MDM_USAGE_ERROR .
      CATCH CX_MDM_PROVIDER .
      CATCH CX_MDM_SERVER_RC_CODE .
    ENDTRY.
    Pass record id into keys.
    LOOP AT IT_RESULT_SET_KEY INTO WA_RESULT_SET_KEY.
      WA_KEYS = WA_RESULT_SET_KEY-RECORD_IDS.
    ENDLOOP.
    WA_RESULT_SET_DEFINITION-FIELD_NAME = <Look field name>.
    APPEND WA_RESULT_SET_DEFINITION TO IT_RESULT_SET_DEFINITION.
    CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE
      EXPORTING
        IV_OBJECT_TYPE_CODE      = <MDM Main Table>
        IT_RESULT_SET_DEFINITION = IT_RESULT_SET_DEFINITION
        IT_KEYS                  = WA_KEYS
      IMPORTING
        ET_RESULT_SET            = IT_RESULT_SET.
    LOOP AT IT_RESULT_SET INTO
            WA_RESULT_SET.
    *PASS KEYS INTO MAIN TABLE TO GET Structure for FALT or Look up Table
      TRY.
          CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
            EXPORTING
              IV_OBJECT_TYPE_CODE = <MDM Main Table>
              IT_KEYS             = WA_KEYS
            IMPORTING
              ET_DDIC_STRUCTURE =<SAP Strct having all Look up fileds of MDM>         
      ENDTRY.
      LOOP AT <SAP Strct having all Look up fileds of MDM> INTO <Work area>.
        CLEAR WA_KEYS.
        APPEND <Work area>-field name TO WA_KEYS.
        CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
          EXPORTING
            IV_OBJECT_TYPE_CODE = <MDM Lookup table name>
            IT_KEYS             = WA_KEYS
          IMPORTING
            ET_DDIC_STRUCTURE   = <Single Structure in SAP For Lookup field>.
        READ TABLE <Single Structure in SAP For Lookup field>. INTO <Work Area> INDEX 1.
    Here you can get the value of realted lookup fields associated with main table data.
      ENDLOOP.
    ENDLOOP.
    LR_API->MO_ACCESSOR->DISCONNECT( ).
    Edited by: Shyam Babu Sah on Nov 24, 2009 4:52 AM

  • Reading data from Lookup [qualified flat] (multi-valued) table

    I have a main table u2019ABCu2019 which has a Lookup [qualified flat] (multi-valued) field u2018XYZu2019 along with some other text fields. I am able to read data from table ABC including lookup field data, but I do not see the relation
    For Ex: If for a contract in table u2018ABCu2019, there are multiple line items in look up table. I have a contract with 2 line items in u2018ABCu2019, but 4 line items in look up table (2 records each for each line item with item number).  Now, when I read the data from table u2018ABCu2019 for that contract, I get all the 4 lines in result table; but item no is blank even though there is item no field in table u2018XYZu2019.
    Below is the sample code:
    wa_query-parameter_code = Contract ID Field.
      wa_query-operator = 'EQ'.
      wa_query-dimension_type = 1. "mdmif_search_dim_field.
      wa_query-constraint_type =8. " mdmif_search_constr_text.
      wa_string =  Contract Number.
      GET REFERENCE OF wa_string INTO wa_query-value_low.
      APPEND wa_query TO lt_query.
      CLEAR wa_query.
    CALL METHOD lcl_api->mo_core_service->query
            EXPORTING
              iv_object_type_code      = 'ABCu2019
            it_query                 = lt_query
            IMPORTING
              et_result_set            = lt_result_set_key.
    LOOP AT lt_result_set_key INTO ls_result_set_key.
        lt_keys = ls_result_set_key-record_ids.
      ENDLOOP.
    Contract Price for lower bound
      ls_result_set_definition-field_name = XYZ'.
      APPEND ls_result_set_definition TO lt_result_set_definition.
    CALL METHOD lcl_api->mo_core_service->retrieve
        EXPORTING
          iv_object_type_code      = 'ABCu2019
          it_result_set_definition = lt_result_set_definition
          it_keys                  = lt_keys
        IMPORTING
          et_result_set            = lt_result_set.
    In table lt_result_set, I see 4 records, but I do not know which 2 records belong to item 1 of the contract and other 2 records for item2.
    Can anyone help me in resolving this. Any kind of help is appreciated.
    Thanks,
    Shekar

    i do not quite understand ur problem statement ..
    but if u have items in the main table to which QLUT entries are linked ..
    then when you read the main table record (u get LinkIds at the record level) that gives u the relation to the Qlookup values
    i mean for ur case - u would get only 2 values in the QLUT values for the "selected" record in the main table
    am not sure if you say correctly - that you get "unlinked" values in the QLUts
    so u should 2 values in lt_result_set and not 4  .. see if u are using the LinkIds properly
    hth
    thanks
    -Adrivit

  • Problem while reading data  from USB with JSR80

    Hi
    Iam using Fedora 9 with 32 bit.
    Iam using JSR80 api to read the data from USB devices.
    I successfully set-up the code as per given on JSR80 site on my eclipsce ide.
    below is my code which iam using to read data from usb
    import com.ibm.jusb.*;
    import java.util.List;
    import javax.usb.*;
    import java.util.List;
    public class USBReader {
    public static  UsbInterface interf = null;
         public static void main(String[] args) {
              try
            {// Access the system USB services, and access to the root
             // hub. Then traverse through the root hub.
               System.out.println("Application started");
             UsbServices services = UsbHostManager.getUsbServices();
             UsbHub rootHub = services.getRootUsbHub();
             traverse(rootHub);
             testIO(rootHub);
            } catch (Exception e) {
                 System.out.println("The Exception occured"+e.getMessage());
          public static void traverse(UsbDevice device){
               System.out.println("Iam in traverse ");
               if (device.isUsbHub()){  
                    // This is a USB Hub, traverse through the hub.
                    System.out.println("The device is hub");
                    List attachedDevices = ((UsbHub) device).getAttachedUsbDevices();
                    System.out.println("The attached devices size:"+attachedDevices.size());
                    for (int i=0; i<attachedDevices.size(); i++){
                         traverse((UsbDevice) attachedDevices.get(i));
                    if(attachedDevices !=null){
                         for(int j=0;j<attachedDevices.size();j++){
                              System.out.println("The device is"+attachedDevices.get(j));
           else{
              // This is a USB function, not a hub.
              // Do something.
                System.out.println("The device is not hub");
          public static void testIO(UsbDevice device) throws UsbClaimException, UsbNotActiveException, UsbDisconnectedException, UsbException{
               System.out.println("Iam in testIO");
              try{
                 // Access to the active configuration of the USB device, obtain
                 // all the interfaces available in that configuration.
                 UsbConfiguration config = device.getActiveUsbConfiguration();
                 List totalInterfaces = config.getUsbInterfaces();
                 System.out.println("The Total interfaces: "+totalInterfaces.size());
                 // Traverse through all the interfaces, and access the endpoints
                 // available to that interface for I/O.
                 for (int i=0; i<totalInterfaces.size(); i++){
                    interf = (UsbInterface) totalInterfaces.get(i);
                    System.out.println("The interfaces are "+totalInterfaces.get(i));
                    String strinf=interf.getInterfaceString();
                    System.out.println("Claimed Status: "+interf.isClaimed());
                    System.out.println("Active status : "+interf.isActive());
                    System.out.println("Settings :"+interf.getNumSettings());
                    //interf.release();
                    interf.claim();
                    List totalEndpoints = interf.getUsbEndpoints();
                    for (int j=0; j<totalEndpoints.size(); j++){
                       // Access the particular endpoint, determine the direction
                       // of its data flow, and type of data transfer, and open the
                       // data pipe for I/O.
                       UsbEndpoint ep = (UsbEndpoint) totalEndpoints.get(i);
                       int direction = ep.getDirection();
                       int type = ep.getType();
                       UsbPipe pipe = ep.getUsbPipe();
                       pipe.open();
                       // Perform I/O through the USB pipe here.
                       pipe.close();
                    interf.release();
              } catch (Exception e) {
                   System.out.println("Exception in TestIO"+e.getMessage());
                   e.printStackTrace();
    }When i execute the above code i get the following exception
    Exception in TestIOCannot claim an interface on a virtual root hub.
    javax.usb.UsbException: Cannot claim an interface on a virtual root hub.
         at com.ibm.jusb.VirtualRootUsbHubImp$VirtualRootUsbInterfaceOsImp.claim(VirtualRootUsbHubImp.java:143)
         at com.ibm.jusb.os.DefaultUsbInterfaceOsImp.claim(DefaultUsbInterfaceOsImp.java:54)
         at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:109)
         at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:83)
         at USBReader.testIO(USBReader.java:60)
         at USBReader.main(USBReader.java:15)iam not getting the clue for it .

    Cannot claim an interface on a virtual root hubSo don't do that? I have no idea how to tell, but clearly you need to test a few more attributes before you claim. Or else just log the claim error and continue with the next interface.

  • LPX-00601: Invalid token in: err while trying to read data from xml

    Hey ,
    While trying to read data from xml i got err:
    LPX-00601: Invalid token in: 'path'
    the proc. i'm using to read data from the xml is:
    procedure read_xml_file_test (in_filename in varchar2)
    is
    my_dir  varchar2(20) := 'XML_DIR;
      cur_emp2 number:=0;
      l_bfile   BFILE;
      l_clob    CLOB;
      l_parser  dbms_xmlparser.Parser;
      l_doc     dbms_xmldom.DOMDocument;
      l_nl      dbms_xmldom.DOMNodeList;
      l_nl2    dbms_xmldom.DOMNodeList;
      l_n       dbms_xmldom.DOMNode; 
      l_n2     dbms_xmldom.DOMNode;
      l_temp    VARCHAR2(1000);
    v_errors        internet_clients.errors%type; 
    src_csid       NUMBER := NLS_CHARSET_ID('UTF8'); 
    dest_offset    INTEGER := 1;
    src_offset     INTEGER := 1;
    lang_context   INTEGER := dbms_lob.default_lang_ctx;
    warning        INTEGER;
    v_count       number := 0;   --total records
    v_count_s      number := 0;   -- sucsess record
    v_count_f      number := 0;   -- failed record
    v_flag varchar2(1);
    v_char2 varchar2(1);
    v_l1 VARCHAR2(255);
    v_l2 VARCHAR2(255);
    v_l3 VARCHAR2(255);
    v_l4 VARCHAR2(255);
    v_l6 VARCHAR2(255);
    BEGIN
      l_bfile := BFileName(my_dir, in_filename);
      dbms_lob.createtemporary(l_clob, cache=>FALSE);
      dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
      dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile), dest_offset,src_offset, src_csid, lang_context, warning);                        
      dbms_lob.close(l_bfile);
      -- make sure implicit date conversions are performed correctly
      dbms_session.set_nls('NLS_DATE_FORMAT','''DD/MM/RR HH24:MI:SS''');   
      -- 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 resources associated with the CLOB and Parser now they are no longer needed.
      dbms_lob.freetemporary(l_clob);
      dbms_xmlparser.freeParser(l_parser);  
      -- Get a list of all the  nodes in the document using the XPATH syntax.
      l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP');
      -- Loop through the list and create a new record in a tble collection
      -- for each  record.
      FOR cur_emp IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
       l_n := dbms_xmldom.item(l_nl, cur_emp);
       cur_emp2:=0;
       loop
         v_count := v_count + 1;
         begin
        -- Use XPATH syntax to assign values to he elements of the collection.
        dbms_xslprocessor.valueOf(l_n,'L1/text()',v_l1);
        dbms_xslprocessor.valueOf(l_n,'L2/text()',v_l2);
        dbms_xslprocessor.valueOf(l_n,'L3/text()',v_l3);
        dbms_xslprocessor.valueOf(l_n,'L4/text()',v_l4);
        dbms_xslprocessor.valueOf(l_n,'L6/text()',v_l6);
            exception
      when others then 
      null;
      end;
    exit when cur_emp2=dbms_xmldom.getLength(l_nl2);
      END LOOP;
      end loop;
      -- Free any resources associated with the document now it
      -- is no longer needed.
      dbms_xmldom.freeDocument(l_doc);
      --remove file to another directory   
          --COMMIT;  -- do not use the commit if you want to run this proc. from within the search_dir_list proc , because it execute a select from tmp table dir_list which contain a "on commit delete rows"  clause.    
      /*EXCEPTION
      /*WHEN OTHERS THEN
       dbms_lob.freetemporary(l_clob);
        dbms_xmlparser.freeParser(l_parser);
       dbms_xmldom.freeDocument(l_doc);
        null;
        ROLLBACK; */
    END;While trying to execute this i got:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: 'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP'
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 939
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 967
    ORA-06512: at "MARKET.READ_XML_FILE_TEST", line 51
    ORA-06512: at line 1
    i guess i mised somthing at the line
    l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP');i attached here part of my xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <soap:Body>
    - <GetFieldsNameResponse xmlns="http://tempuri.org/">
    - <GetFieldsNameResult>
    - <xs:schema id="DataSet_FRM_GANERIC_PROP" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    - <xs:element name="DataSet_FRM_GANERIC_PROP" msdata:IsDataSet="true" msdata:Locale="he-IL">
    - <xs:complexType>
    - <xs:choice minOccurs="0" maxOccurs="unbounded">
    - <xs:element name="FRM_GANERIC_PROP">
    - <xs:complexType>
    - <xs:sequence>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:choice>
      </xs:complexType>
      </xs:element>
      </xs:schema>
    - <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    - <DataSet_FRM_GANERIC_PROP xmlns="">
    - <FRM_GANERIC_PROP diffgr:id="FRM_GANERIC_PROP1" msdata:rowOrder="0">
      <L1>val1</L1>
      <L2>val2</L2>
      <L3>val3</L3>
      <L4>val4</L4>
      <L6>val6</L6>
      </FRM_GANERIC_PROP>
      </DataSet_FRM_GANERIC_PROP>
      </diffgr:diffgram>
      </GetFieldsNameResult>
      </GetFieldsNameResponse>
      </soap:Body>
      </soap:Envelope>I Guess it somthing that have to do with node definition ,
    but i have tried so many combinations and none ot those worked for me.
    i'm deeply stuck here.
    What do i miss here?
    THANKS yair
    Edited by: yair_k on 02:30 14/10/2010

    Hey , after got a lot of success with the xml reading part , i wonder if you
    can help me with a problem while trying to reading that xml from a web service.
    i use a procedure as followes:
    FUNCTION read_from_web_service(in_username in varchar2 , in_password in varchar2)
      RETURN CHAR
    AS
      l_service          UTL_DBWS.service;
      l_call             UTL_DBWS.call;
      l_a_ns                     VARCHAR2(32767);
      l_wsdl_url         VARCHAR2(32767);
      l_namespace        VARCHAR2(32767);
      l_service_qname    UTL_DBWS.qname;
      l_port_qname       UTL_DBWS.qname;
      l_operation_qname  UTL_DBWS.qname;
      l_xmltype_in       SYS.XMLTYPE;
      l_xmltype_out      SYS.XMLTYPE;
      l_return           VARCHAR2(32767);
    BEGIN
      l_wsdl_url        := 'http://www.company.com/publisherService/ServiceGetpublisherTable.asmx?wsdl';
      l_namespace       := 'http://tempuri.org/';
      l_service_qname   := UTL_DBWS.to_qname(l_namespace, 'ServiceGetpublisherTable');
      l_port_qname      := UTL_DBWS.to_qname(l_namespace, 'ServiceGetpublisherTableSoap');
      l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'GetFieldsName');
      l_service := UTL_DBWS.create_service (
        wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
        service_name           => l_service_qname);
      l_call := UTL_DBWS.create_call (
        service_handle => l_service,
        port_name      => l_port_qname,
        operation_name => l_operation_qname);
      l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
        <GetFieldsName xmlns="' || l_namespace || '">
        <user>' || in_username || '</user>
        <password>'|| in_password || '</password>
        </GetFieldsName>');
      l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
                                       request     => l_xmltype_in);
      UTL_DBWS.release_call (call_handle => l_call);
      UTL_DBWS.release_service (service_handle => l_service);
      l_return := l_xmltype_out.extract('//GetFieldsName/text()').getstringVal();
       dbms_output.put_line(l_return);     
      RETURN l_return;
    END;but when i run it i got message:
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: Server did not recognize the value of HTTP Header SOAPAction: .
    regarding the line:
    l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
    request => l_xmltype_in);
    So , i deeply stuck here!
    my web service description is:
      <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
    - <s:element name="GetFieldsName">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="GetFieldsNameResponse">
    - <s:complexType>
    - <s:sequence>
    - <s:element minOccurs="0" maxOccurs="1" name="GetFieldsNameResult">
    - <s:complexType>
    - <s:sequence>
      <s:element ref="s:schema" />
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="GetMSG_ByUser_Not_Readed">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="GetMSG_ByUser_Not_ReadedResponse">
    - <s:complexType>
    - <s:sequence>
    - <s:element minOccurs="0" maxOccurs="1" name="GetMSG_ByUser_Not_ReadedResult">
    - <s:complexType>
    - <s:sequence>
      <s:element ref="s:schema" />
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="SetMSG_ByUser_Not_Readed_As_Readed">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Rec_Id" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="SetMSG_ByUser_Not_Readed_As_ReadedResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="SetMSG_ByUser_Not_Readed_As_ReadedResult" type="s:boolean" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="GetFieldsNameSoapIn">
      <wsdl:part name="parameters" element="tns:GetFieldsName" />
      </wsdl:message>
    - <wsdl:message name="GetFieldsNameSoapOut">
      <wsdl:part name="parameters" element="tns:GetFieldsNameResponse" />
      </wsdl:message>
    - <wsdl:message name="GetMSG_ByUser_Not_ReadedSoapIn">
      <wsdl:part name="parameters" element="tns:GetMSG_ByUser_Not_Readed" />
      </wsdl:message>
    - <wsdl:message name="GetMSG_ByUser_Not_ReadedSoapOut">
      <wsdl:part name="parameters" element="tns:GetMSG_ByUser_Not_ReadedResponse" />
      </wsdl:message>
    - <wsdl:message name="SetMSG_ByUser_Not_Readed_As_ReadedSoapIn">
      <wsdl:part name="parameters" element="tns:SetMSG_ByUser_Not_Readed_As_Readed" />
      </wsdl:message>
    - <wsdl:message name="SetMSG_ByUser_Not_Readed_As_ReadedSoapOut">
      <wsdl:part name="parameters" element="tns:SetMSG_ByUser_Not_Readed_As_ReadedResponse" />
      </wsdl:message>
    - <wsdl:portType name="ServiceGetpublisherTableSoap">
    - <wsdl:operation name="GetFieldsName">
      <wsdl:input message="tns:GetFieldsNameSoapIn" />
      <wsdl:output message="tns:GetFieldsNameSoapOut" />
      </wsdl:operation>
    - <wsdl:operation name="GetMSG_ByUser_Not_Readed">
      <wsdl:input message="tns:GetMSG_ByUser_Not_ReadedSoapIn" />
      <wsdl:output message="tns:GetMSG_ByUser_Not_ReadedSoapOut" />
      </wsdl:operation>
    - <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
      <wsdl:input message="tns:SetMSG_ByUser_Not_Readed_As_ReadedSoapIn" />
      <wsdl:output message="tns:SetMSG_ByUser_Not_Readed_As_ReadedSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="ServiceGetpublisherTableSoap" type="tns:ServiceGetpublisherTableSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="GetFieldsName">
      <soap:operation soapAction="http://tempuri.org/GetFieldsName" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetMSG_ByUser_Not_Readed">
      <soap:operation soapAction="http://tempuri.org/GetMSG_ByUser_Not_Readed" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
      <soap:operation soapAction="http://tempuri.org/SetMSG_ByUser_Not_Readed_As_Readed" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:binding name="ServiceGetpublisherTableSoap12" type="tns:ServiceGetpublisherTableSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="GetFieldsName">
      <soap12:operation soapAction="http://tempuri.org/GetFieldsName" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetMSG_ByUser_Not_Readed">
      <soap12:operation soapAction="http://tempuri.org/GetMSG_ByUser_Not_Readed" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
      <soap12:operation soapAction="http://tempuri.org/SetMSG_ByUser_Not_Readed_As_Readed" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="ServiceGetpublisherTable">
    - <wsdl:port name="ServiceGetpublisherTableSoap" binding="tns:ServiceGetpublisherTableSoap">
      <soap:address location="http://www.company.com/publisherService/ServiceGetpublisherTable.asmx" />
      </wsdl:port>
    - <wsdl:port name="ServiceGetpublisherTableSoap12" binding="tns:ServiceGetpublisherTableSoap12">
      <soap12:address location="http://www.company.com/publisherService/ServiceGetpublisherTable.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>also i have to mention that i have changed publisher references inside the code , and i also canot
    supply username and password , so i guess you canot test it. still i not shure if my definitions (namespace est.) inside my code defined correctly.
    hope you can help me with this.
    regards
    yair

Maybe you are looking for

  • Search result Page throw Error for anonymous User

    We have claim base WebApplication in SharePoint 2013. Every thing is working fine and user can login site without any problem. Only search result page not working..its given "Sorry, something went wrong " From ULS Log I found below exception CoreResu

  • Any idea how to send a downloaded document by email?

    Any idea how to send a downloaded document by email from a MacBook Pro?

  • Start with Connect By: What if Parent is the Child?

    Version : 11g Hi There, I had a question regarding Start with Connect by. The following is an example from the ORacle help from the Emploees table select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status,        level

  • Charge uk iPad in USA

    iPad - power. Based in UK 220/240v power. Going to USA 110v power. Is there a  built in transformer in the iPad or iPad cable?  I.e. Can I just use a plug adapter to accommodate the different plug point/prongs? Grateful for any clarification, thank y

  • Q6600 overclock won't start up on cold start, but works fine on restart?

    I've successfully overclocked my Q6600 on my msi p6ndiamond board, but I have a weird issue. If I start up my computer from a cold start, it will almost always crash. After restarting however, it will work just fine. I don't know what this is a sympt