Reading part of integer

I have an integer (for example 123412). I would like to read only two first numbers or two last numbers of it. How could I do that?

And if this is a school exercise and you need to do it numerically, have a look at the % (modulo operator)* and the java.lang.Math class, especially the log10(...) method**.
* needed to get the last two digits, see: http://www.cafeaulait.org/course/week2/15.html
** needed to get the first two digits

Similar Messages

  • Help! Help!  "URLStream":How to read part byte?

    I use pdf2swf.exe will PDF convert  to SWF,Used for the on-line browsing.
    How to use URLStream data read part of data flow, and closed after already got the data to display properly.
    Similar to realize(Demo):http://wenku.baidu.com/view/c67fc3ec0975f46527d3e1ee.html
    i'm Chinese,my English Maybe very poor,I hope you can see clearly.thank!

    Try use such code:
    String str = convertToStringFromBytes(input,count).trim();     
    System.out.println(Integer.valueOf(str,2).byteValue());

  • Read part of an array element

    Hello All.
    As indicated in the title, I am trying to read part of an array element.
    What I'm doing is reading values from a LeCroy scope using a "write" than "read" I have returned the read values into an array but the issue is the scope returns a value "1, 52.33E-3"
    I simply want the element to be 52.33 that way I can use that for other calculations.
    For example my array is.
    "1, 34.334E-3"
    "1, 53.343E-3"
    "1, 143.232E-"
    And I want it to be
    34.334
    53.343
    143.232
    Thanks!
    Solved!
    Go to Solution.

    Another option is to use Spreadsheet String to Array and use the comma as the delimiter.  It can actually change your string into an array of numbers.  Then you just index out the number you want.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • HttpServletRequest getReader read part of the post data

    Hi all,
    HttpServletRequest getReader read part of the post data (even though the conten length is bigger).
    It stops after 48k (49,152 bytes)
    int sizeOfBuffer = 100;
    char[] cbuf = new char[sizeOfBuffer];
    StringBuffer inputBuffer = new StringBuffer();
    BufferedReader reader = request.getReader();
    int chars = 0;
    while ((chars = reader.read(cbuf)) >= 0) {
    inputBuffer.append(cbuf, 0, chars);
    reader.close();
    inputBuffer includes parts of the data??
    Can anyone help me to know what is wrong??
    Thanks,
    Lior.

    Hi Jakub,
    Yes, you can query TDM files for samples with certain specifications.  Take a look at this Tutorial Introduction to LabVIEW Data Storage VIs.  The section on Query Conditions demonstrates how to look for select samples using the Data Storage express VIs. 
    I hope this is helpful.  Please post if you have further questions!
    Cheers,
    Megan B.
    Applications Engineer
    National Instruments

  • HT4059 Could ibooks read parts of a book or pdf for you? And if it could than how?

    could ibooks read parts of a book or pdf for you, and if it could how?

    It is the publishers who have to take the decision that they are willing to give Apple (or Amazon or anyone) the rights to distribute their products that way before anything else could be done.  I think the idea needs to be sold to them first.  It would be analogous to what some movie companies now do -- when you purchase a physical DVD from them, you also get rights to download a digital copy which can legally go on your iPad.   Apple's not involved in that case.

  • B590 - SD media card reader part number?

    Hi 
    Please can someone confirm the part number of the SD card reader and where I can purchase one for my B590 as it didn't come with one and there is a void in the casing where there should be one.
    I'm in the UK.
    Thanks
    Rich
    Solved!
    Go to Solution.

    hi Brungle,
    Welcome to the Lenovo Forums.
    Looking at page 62 of the B590 HMM, the part number for the Card Reader (I/O Board) is 90000234.
     - Link to picture
    AFAIK, having a void on the card reader slot means the I/O Board has no card reader (most likely on selected B590 models). To verify this, may I know the machine type model of your B590 system (eg. MBX3PUK)? 
    If you're planning on replacing the card reader, you can opt to:
    1. Replace it with this item (I recommend you contact the seller first for best compatibility)
    2. Use a USB card reader (cheaper alternative)
    Regards
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Get Part Of Integer

    I have an integer 'year' which is four digits.
    I need to be able to get the first two digits and make that a seperate integer and the last two digits and make that a seperate integer also.
    Any sample code would be great.
    Thanx

    Samantha's answer is correct. But if you got '2003' and do the following operations:
    int year = 2003;
    int firstTwoDigits = year / 100;
    int secondTwoDigits = year % 100; // this will result in 3, not 03You'd have to add in some code to display it differently if you really need two digits.

  • Help reading parts lookup

    Hi, I'm looking into buying a T440s from someone I dont know off of kijiji, so naturally I'm a little skeptical. I got them to send me the serial number and Machine type, and i checked the warranty, which was okay. I tried to do a parts lookup in order to confirm the specs that were given to me, but im having a hard time decifering the results. I will attach a screen shot and hopefully someone can help me out.
    Just wanted to say that everyone I have dealt with so far has been so helpful, and I really hope I end up purchasing a lenovo laptop because you guys are awesome !

    Hi,
    MTM is Machine Type/Model.  An example for a T440s (just an example) would be 20AQ003LUS.
    If you can get the MTM and it's a North American machine, you may be able to find it in the tabook:  http://www.lenovo.com/psref/pdf/tabook.pdf
    You can also go to SUPPORT (above) and enter it in Quick Path and get a quick dump of the machines's specs.
    The MTM above (again just an example) produces this:
    i5-4200U(2.6GHz), 4GB RAM, 500GB 7200rpm HD, 14.1in 1600x900 LCD, Intel HD Graphics, Intel 802.11 ac abgn wireless, WWAN option, Bluetooth, 1Gb Ethernet, UltraNav, Secure Chip, Fingerprint reader, Camera, 3c Li-Poly, Win7 Pro 64
    I'm not posting this as an indication of your particular machine's specs, but as an example of you you might dig that up.  (did I already say that...)
    Z.
    The large print: please read the Community Participation Rules before posting. Include as much information as possible: model, machine type, operating system, and a descriptive subject line. Do not include personal information: serial number, telephone number, email address, etc.  The fine print: I do not work for, nor do I speak for Lenovo. Unsolicited private messages will be ignored. ... GeezBlog
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Please help to read parts of image.

    I have an jpeg-image.
    The size of the image is 8000*8000
    How can I read only first 1000*1000 pixels from the image-file without loading the whole image into the memory?
    If I now loaded this 1000*1000 in memory as a BufferedImage, how can I read only pixels in range
    600-700
    600-700
    so, 100*100, start from 600,600
    Thanks in advance.

    Thanks for the answer.
    I have faced a problem with ImageIO.
    If I read Image from file and then display it later, I need the double size of RAM for the image in the memory. First to put it into the memory from a file and the second read some parts from the BufferedImage to display it.
    Is there any posibility to reference to the parts of the image, that was loaded to Image object, after the file was readed?
    If I do it like this, i need doubled RAM size.
    private Image img;
    img = ImageIO.read(new File("bigImage.jpg"));
    protected void paintComponent(Graphics g) {
    int[] rgb = new int[600*600];
    img.getRGB(0, 0, 600, 600, rgb, 0, 600);
    BufferedImage img1 = new BufferedImage(600,600,BufferedImage.TYPE_INT_RGB);
    img1.setRGB(0, 0, 600, 600, rgb, 0, 600);
    g2D.drawImage(img1, null, 0, 0);
    }

  • 2 parts: 1) integer array to string 2) string out to a jTextField

    I am completely new to Java and Netbeans, but I'm writing my 1st
    application that takes a "hex" character input from a jTextField,
    then converts it to an "binary" integer array. I then do a lot of bit
    manipulation, and generate a new "binary" integer array.
    String myhex = jTextField1.getText();
        int len = myhex.length();
        int[] binarray = new int[len*4];
            for (int i = 0; i < len; i++) {
               if (myhex.charAt(i) == '0'){
                  binarray[4*i]=0;
                  binarray[4*i+1]=0;
                  binarray[4*i+2]=0;
                  binarray[4*i+3]=0;
               else if (myhex.charAt(i) ==
               // repeat for '1 to 9' and 'a-f/A-F'
               // generate new integer array(s) using various bits from binarrayI realize it might not be the best way to do the
    conversion, but my input can be of arbitrary length,
    and it is my first time trying to write Java code.
    All of the above I've completed and it works...(thanks Netbeans
    for making the gui interface design a real breeze!)
    So I end up with:
    binarray[0]=0 or 1
    binarray[1]=0 or 1
    binarray[2]=0 or 1
    binarray[n]=0 or 1
    Where n can be any number from 0 to 63...
    I then manipulate the bits in binarray creating a new integer array
    and for the sake of expediency let's call it "newbinarray".
    newbinarray[0]=0 or 1
    newbinarray[1]=0 or 1
    newbinarray[2]=0 or 1
    newbinarray[n]=0 or 1
    Where n can be any number from 0 to 63...
    I first need to know how to convert this "newbinarray" integer array to a string.
    In the simplest terms if the first three elements of the array are [0][1][1],
    I want the string to be 011.
    Then I want to take this newly formed string and output it to a jTextField.
    string 011 output in JTextField as 011
    I've scoured the net, and I've seen a lot of complex answers involving
    formatting, but I'm looking for just a simple answer here so I can finish
    this application as quickly as possible.
    Thanks,
    Thorne Kontos

    Here's an example, not using NetBeans:
    import javax.swing.*;
    public class TextDemo extends JPanel
        public TextDemo()
            int[] newbinarray = {0, 1, 1};
            StringBuffer sb = new StringBuffer();
            for (int value : newbinarray)
                sb.append(value);
            String st = new String(sb);
            this.add(new JTextField(st));
        private static void createAndShowGUI()
            JFrame frame = new JFrame("TextDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add(new TextDemo());
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args)
            javax.swing.SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShowGUI();
    }

  • Reading part of another page

    I have some cfm pages on my server. I want to take one of those pages and pull the contents of JUST the h1 and h2 tags from that page into another cfm page. I know I can do a cffile/read, but that gets everything. I just want what's between the h1 and h2 tags. Possible?
    Edit:
    Nevermind. Since the documents I'm dealing with consistently have only one h1 and one h2 tags, I've found I can just parse them the same way I'm parsing xml files, using cffile to read the document and xmlparse to parse it. Great!

    Depending on your approach,  you could actually use a client side library such as jQuery to asynchronously load the content you're looking for.
    From the jQuery documentation: http://api.jquery.com/load/
    $('#result').load('test.html #container');
    The above line loads the contents of the container id from the page test.html into the result container on the current page. So in your case you could try this:
    $('#result').load('test.html h1, h2');
    Not sure about targeting multiple remote DOM elements with load, but regardless, jQuery makes getting fragments of pages simple.

  • How does the "Read TDMS" function work when reading part of a data file?

    Hi everyone,
    I have stored some rather large .lvm files that causing me a a big headache when trying to read/analyse the data.... As a work around I first convereted these files to .tdms.... Now the files are much smaller (50%) and can be load/plot within a couple of seconds rather than 10's of seconds.
    Specifically, the files include 7 channels of data that were sampled at 2kHz for about 8-9 mins..... So, each file contains about 700,000 data points or elements.... I am using a producer/consumer architechure to read/plot all the data, then using cursors to identify a data subset, which is send via a queue to the consumer where analysis occurs.... Given the size of the files, when subset is quite large I get "Out of Memory" errors and LabVIEW crashes.
    What I am thinking is that I can down-sample or decimate the data in the producer back to 1kHz (I need to ms resolution so I can see the spikes and can appropriately selected the subset) then index back into the original tdms file to send the undeciated data to the consumer.
    With the "Read TDMS" function, the help states:
    COUNT: Specifies the maximum number of data elements to read from the .tdms file for each channel. The default is –1.
    OFFSET: Specifies the number of data elements into the .tdms file at which the function begins analyzing the .tdms file. The default is 0.
    I am confused by the term "elements". Does this mean actual "data points" as in elements within the 2D array? Or bytes? I am hoping array elements... Would this then mean that given my 7 channels of data, each element value that is a multiple of 7 would index into a new line of data? I also assume this index is zero based... So with no offset, a count value of 0 would return all the data elements at time 0.0000s for all channels (regardless differences in the precision of each channel, unlike bytes), a value of 7 would return all the data elements at time 0.0005s, a value of 14 would return all the data elements at time 0.0010s, etc etc..
    Also, if anyone has any example code for indexing into a file using this method they could shareI would be very appreciative... I would assume a for loop could also be used to read the data subset into the consumer in smaller chunks to reduce the memory load?
    Many thanks,
    Jack

    You should have a different channel in the TDMS file.  So you are reading X elements from a channel starting at element Y.  Yes, those are elements in the array, not Bytes.  NI did a good job of making the API easy to use.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Integer and fractional part of the number

    Hello everybody,
    I want to divide the floating point number to 2 integer words, first will receive the interger part of number, and the second will receive the fractional part of the number.
    For example: I have number 751.98 in DBL, then I create two integer fields: first has value 751, second has value 98.
    I have tried simple conversion from DBL to I16, but it always rounded me to higher interger. I don't want to round it. And I just don't know how to transform the fractional part to integer. Are there any specialized functions for this? Maybe should I use log10 or similar?
    TIA,
    Jacek.

    The place to start with this problem is the IEEE-754 numerical
    representations:
    32 bit floating point is internally:
    highest order bit is the sign bit.
    the next 8 bits are the exponent bits
    the last 23 bits are the mantissa bits
    the mantissas and exponents are binary.
    the mantissa value in a 1.22 fixed point binary number, i.e. the most
    significant binary bit is equal to 1, the next most is equal to 1/2,
    the next most is equal to 1/4, etc., etc.
    The exponent part can go between 2^-127 and 2^128
    You should be able to cast your 32 bit float to a 32 bit unsigned
    integer, separate it into sign, mantissa and exponent parts, use the
    exponent to rotate left or right your mantissa decimal point by the
    exponent value and then separate the whole part from the fractional
    part and then put each into the I16's or U16's as you want.
    Douglas De Clue
    LabVIEW programmer
    [email protected]
    [email protected] (Michael Ross) wrote in message news:...
    > This problem needs some limits. Like: only return the decimal portion
    > out to 6 places.
    >
    > First run the number through Remainder and Quotient (divisor of 1).
    >
    > 751.98743674645641000000 gets remainder of
    >
    > 0.98743674645641021900
    >
    > "floor" is 751
    >
    > Take the remainder and send through Decimal to Fractional String (this
    > is where you set your number of decimal places [default is 6]).
    >
    > returns 0.987437
    >
    > Then use String Subset and set it to an offset of 2 (cleans off the
    > leading zero and decimal point) with the "length" input left at the
    > default of "rest" (of string).
    >
    > 987437 (in string form)
    >
    > Now use String to Decimal Number
    >
    > returns 987437 (as a decimal number)
    > ====================================
    > I think if you don't limit the number of places it is ugly. It is
    > ugly going from numbers to strings and then back. But all numbers is a
    > bad thing.
    >
    > The alogirithm for finding the answer mathematically is nasty.
    > Especially without a limit on decimal places. You have to figure out
    > the number of decimal places and multiply by the inverse of the last
    > decimal place. Sounds easy.
    > =============================
    > Try this: New number: 751.98652
    >
    > Truncate out the remainder (Remainder and Quotient (divisor of 1)):
    >
    > 751.98652 ---> 0.98652
    >
    > Mult by 10 ----> 9.8652
    >
    > Take the floor (9) and divide by 10 ----> 0.9
    >
    > subtract the new number from the old. Is the answer non-zero? Not,
    > then keep on
    >
    > 0.98652 - 0.9 = .08652 which not equal to 0
    >
    > If it is zero, the floor is the answer.
    >
    > Continue - Not:
    >
    > This time multiply by 100 ----> 98.652
    >
    > floor is 98, divide by 100 ----> 0.98
    >
    > Subtract 0.98 from 0.98652 = .00652 still non zero.
    >
    > Keep on. 1,000, 10,000...When you get to 100,000
    >
    > 0.98652 x 100,000 = 98652.00
    >
    > Get the floor
    >
    > divide the floor by 100,000 to get the original number (remainder is
    > now 0.000), compare to original remainder
    >
    > 0.98652 - 0.98652 = 0. Yay.
    >
    > Take the 98652 and go with it. The last place was the one hundred
    > thousandth.
    >
    > I can't take credit for the last, I had uglier stuff going on. I did
    > do the string thing.
    >
    > I swear this is just like some sorry homework problem.
    >
    > Mike

  • Reading an integer size element from file

    Hello, I need some help for reading an integer size element from a file. In C++ there is the function fread with the following signature size_t fread(void ptr, size_t size, size_t nitems, FILE stream); where size is the size of one of the elements. Using this function in c++, you can read an integer by setting size = sizeof(int). I need this function because I am writing in a file a lot of integers and characters without any separator and I need to take the first element which is always an integer. Here is an example:
    I have: int x = 234; String y = "12ABC". I write those two elements in an output file. Now, when reading from that file the content of the file is: 23412ABC and I need to take the two elements x and y.
    Can anyone help ?

    I see what you mean but the problem is a bit more complicated, maybe I did not explain well. I need to copy data in a text file and retrieve them. Most data that will be written in the file are stored in an char array. those data may contain digits, letters, special characters... depending on their ASCII code. But before writting that char array, I need to write an integer corresponding to a specific index and I have no way of predicting the number of digits of that integer. So for example, my char array contains the following data: {'1','2','3','a','b','c'} and my int equals 10000. Using FileWriter I write the int and then the char array using the method myfile.write with its arguments. Next step, I want now to read from myfile.txt the data that I wrote in the first step. I start reading the int then using myfile.read(mychararray, 0, 6) /*6 being the size of the bloc to be read*/ I read the remaining characters and store each char in a cell of mychararray. The problem with this, is that using the method .read I can not read the first integer since I don't know its size: it may contain 1, 2 or even more digits.
    I know that storing everything in bytes would make my task easier, but I necessarily need to store an array of characters and then use .read method to store the content of the file (after having read the int of course) in a char array. Last clarification, the step of writing int then char array is reproduced n times before calling myfile.close();
    I hope it is clearer than before. Any suggestion for this problem would be welcome.

  • 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