Can´t read page containing XML using GET HTTP Document

Hello forum users, 
I'm have a problem with the LabVIEW Internet Toolkit and I'm woundering if its me that is doing something wrong or if it is a limitation of the VI. 
I have a robotic application which comunicates with LabVIEW via internet. 
the robots sends and receives information via XML which is posted on a webpage. 
I've been trying to use the LabVIEW Internet Toolkit's GET HTTP Document. while I can obtain HTML data from any webpage when I try to access my webpage containing XML data  I get an Error 66 (connection closed by peer message).
What is even stranger is that on two distinct occasions the program returned the XML data 
The page is set up so that when accesed (for example http://192.168.0.102:4950/move.cgi?op=setVel&vel=300). It will define the robot's speed at 300 mm/s and return a page with a simple XML data such as
<result>true</result>
When I access the page in using the Get HTTP Document, the request is sent. the robot does the action required but the XML data I need isn't returned. 
I have applications that do this in C++, python, and MatLab, without a problem and I didn't want to have to resort to low level TCP/IP functions. 
any suggestions???
Is this a limitation of the GET HTTP Document VI (it only gets HTML documents)
Thanks in advanced
Bruno Noronha
Certified LabVIEW Associate Developer
Using LabVIEW 8.6

Hi, Bruno.
Maybe my case will help you. I've faced a problem similar than yours. I have a network camera whose API is HTTP based, I mean, I can control it using HTTP requests, i.e. http://myserver/axis-cgi/bitmap/image.bmp
takes a picture and returns it in bmp format.
There are other requests that can send data back, i.e.
http://<servername>/axis-cgi/com/ptz.cgi?query=pos​ition
retrieves pan and tilt degrees and zoom value (it is a PTZ camera or pan-tilt-zoom, it has two joints that rotate left-right and up-down, and a zoom). In this case, the information is sent in plain text. But I had like you an error 66 in TCP Read.vi.
After debugging "Get HTTP document.vi" I noticed this information is sent back, but due to the error in "TCP Read.vi", it's not transmitted to the remaining TCP functions in execution order, and finally is lost.
In order to debug "Get HTTP document.vi" you'll need to unmark "Reentrant execution" and mark "Allow debugging" in VI Properties->Execution.
The information string enters "TCP Read.vi" by the terminal "buffer in", and leaves it by "buffer out". The next function, "TCP Read Stream.vi" receives also this string, but it's lost in case there's an error in the entry error cluster. So I removed the wire the connects this two TCP VIs, and finally got the string at the "content" terminal.
It may not be the most orthodox solution, but at least it let me continue working. If anybody has fixed this issue conveniently, it'd would interesting to share it with us.
Regards,
Francisco
PS. I was with an internship in USP (Sao Carlos, Brazil) for three months in 2007. In this time I visited many times Campinas and its university. Nice place and really good moments :
Hi, Bruno.
Maybe my case will help you. I've faced a problem similar than yours. I have a network camera whose API is HTTP based, I mean, I can control it using HTTP requests, i.e.
http://myserver/axis-cgi/bitmap/image.bmp
takes a picture and returns it in bmp format.
There are other requests that can send data back, i.e.
http://<servername>/axis-cgi/com/ptz.cgi?query=pos​ition
retrieves pan and tilt degrees and zoom value (it is a PTZ camera or pan-tilt-zoom, it has two joints that rotate left-right and up-down, and a zoom). In this case, the information is sent in plain text. But like you I got an error 66 in "TCP Read.vi".
After debugging "Get HTTP document.vi" I noticed this text information is sent back, but due to the error in "TCP Read.vi", it's not transmitted to the remaining TCP functions in execution order, and finally is lost.
In order to debug "Get HTTP document.vi" you'll need to unmark "Reentrant execution" and mark "Allow debugging" in VI Properties --> Execution.
The information string enters "TCP Read.vi" by the terminal "buffer in", and leaves it by "buffer out". The next function, "TCP Read Stream.vi" receives also this string, but it's lost if there's an error in the entry error cluster. So I removed the wire that connects this two TCP VIs, and finally got the string at the "content" terminal.
It may not be the most orthodox solution, but at least it let me continue working. If anybody has fixed this issue conveniently, it'd would interesting to share it with us.
Regards,
Francisco
PS. I was with an internship in USP (Sao Carlos, Brazil) for three months in 2007. In this time I visited many times Campinas and its university. Nice place, nice people and really good moments

Similar Messages

  • Error when reading data from XML using JAXB?

    Hi all,
    I get the error message when reading data from XML using JAXB.
    [org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException
    (AbstractUnmarshallerImpl.java:315)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:481)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:199)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:142)
    I don't find the reason, please help!
    Thanks in advance!

    The problem is sovled.

  • Can i save email addresses in the get a document signed section

    can i save email addresses in the get a document signed section

    Hello lkmaier,
    As of now, its  not possible to save the email addresses manually in EchoSign.They are automatically stored once you send the document out for signature. Later, when you start typing the email address in To field in Send page, the email address is automatically shown up.
    Regards,
    -Rijul
    EchoSign Support

  • URL Get HTTP Document Bug (LV2012)

    I know the Internet Toolkit is deprecated, but since it's still available it should still work.
    Unfortunately the URL Get HTTP Document.vi does not work in Internet TK 2012 for other than text files. It worked fine in LV8.5 with the corresponding Internet TK, but the 2012 version only returns the last part of the content.
    I'm going to switch to the HTTP Client palette, but it's still a pain to find such problems in TKs that used to work fine - losing a lot of time to find the issue.
    See attached snippet which reads a .rtf file from ni.com. HTTP client palette returns correct contents, URL Get HTTP Document only the last chunk.

    Hi,
    I managed to get the URL Get HTTP Document.vi from the ITK to download .tiff files (to save them to a hard-drive location) from a connected device in LV2012 32-bit.
    But now I need to transfer this code over to a computer unsing LV2012 64-bit, hence no ITK - has anyone made/got a VI that will do the job of "URL Get HTTP Document.vi", without the need for the ITK libraries, in LabVIEW 2012 64-bit? Or can show me a way of doing this, with relative ease?
    Many thanks!

  • My email print is so small i can't read it. how do i get it back to normal size?

    If  you know the answer to this problem  please post it on forum as I can't read my email's. Thanks gman55.
    This question was solved.
    View Solution.

    Hi,
    If you access your email in a browser, you can use the following commands.
    Hold down the Ctrl key and press 0 ( Zero ) to return to the default size.
    Hold down the Ctrl key and tap + to increase the size of the page.
    Hold down the Ctrl key and tap - to reduce the size of the page.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Can't read a text file using java

    Hi All
    I am trying to read a log file.
    ProgramA keeps updating the log file, while my program ProgramB reads it.
    For some readson my ProgramB is not able to read the last two lines in the log file. If I run the program in debug mode it is reading all the lines.
    This is having me frustrated.
    Please let me know if there is a way to read entire contents.
    Here is how I am reading the files ( 2ways)
         private static String readFileAsString(String filePath)
        throws java.io.IOException{
            StringBuffer fileData = new StringBuffer(1000);
            FileReader fr = new FileReader(filePath);
            BufferedReader reader = new BufferedReader(fr);
            char[] buf = new char[1024];
            int numRead=0;
            while((numRead=reader.read(buf)) != -1){
                String readData = String.valueOf(buf, 0, numRead);
                fileData.append(readData);
                buf = new char[1024];
            reader.close();
            fr.close();
            return fileData.toString();
           * Fetch the entire contents of a text file, and return it in a String.
           * This style of implementation does not throw Exceptions to the caller.
           * @param aFile is a file which already exists and can be read.
           static public String readFileAsString(String filePath) {
             //...checks on aFile are elided
             StringBuffer contents = new StringBuffer();
             //declared here only to make visible to finally clause
             BufferedReader input = null;
             try {
               //use buffering, reading one line at a time
               //FileReader always assumes default encoding is OK!
               input = new BufferedReader( new FileReader(filePath) );
               String line = null; //not declared within while loop
               * readLine is a bit quirky :
               * it returns the content of a line MINUS the newline.
               * it returns null only for the END of the stream.
               * it returns an empty String if two newlines appear in a row.
               while (( line = input.readLine()) != null){
                 contents.append(line);
                 contents.append(System.getProperty("line.separator"));
             catch (FileNotFoundException ex) {
               ex.printStackTrace();
             catch (IOException ex){
               ex.printStackTrace();
             finally {
               try {
                 if (input!= null) {
                   //flush and close both "input" and its underlying FileReader
                   input.close();
               catch (IOException ex) {
                 ex.printStackTrace();
             return contents.toString();
           }

    If you're using JDK 5 or later, you could use the Scanner class for input information. See below:
    try {
                   Scanner reader = new Scanner(new File("C:\\boot.ini"));
                   StringBuilder sb = new StringBuilder();
                   while (reader.hasNextLine()) {
                        sb.append(reader.nextLine());
                        sb.append(System.getProperty("line.separator"));
                   System.out.println(sb.toString());
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              }

  • How can remove child into file xml using J2ME

    i want to delete child from file xml using midlet but nothing is changed into file
    please help me
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package ajou;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.util.Vector;
    import javax.microedition.io.Connector;
    import javax.microedition.io.HttpConnection;
    import javax.microedition.midlet.MIDlet;
    import org.kxml2.io.KXmlParser;
    import org.kxml2.kdom.Document;
    import org.kxml2.kdom.Element;
    import org.kxml2.kdom.Node;
    * @author -Manel-
    public class manelGO extends MIDlet {
    public void startApp() {
    try {
              //Open http connection
              HttpConnection httpConnection = (HttpConnection) Connector.open("http://localhost:8080/examples/users.xml");
                   //Initilialize XML parser
                   KXmlParser parser = new KXmlParser();
                   parser.setInput(new InputStreamReader(httpConnection.openInputStream()));
                   Document theDoc = new Document();
                   theDoc.parse(parser);
                   Element rootElement = theDoc.getRootElement();
    rootElement.removeChild(1);
              catch (Exception e) {
                   e.printStackTrace ();
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    }

    To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
    your assign will look like:
    <bpel:assign>
    <bpelx:remove>
    <target variable="person" query="/person/@per" />
    </bpelx:remove>
    </bpel:assign>
    Regards,
    Melvin

  • How can I read pages offline that I've previously viewed?

    I'm unable to read websites that I've previously looked at online once I've logged off. I can't go into my history and re-read pages ofline. I can see what I've visited, I just can't open it. What do I need to do to read previously viewed pages offline?

    *Read It Later: https://addons.mozilla.org/firefox/addon/read-it-later/

  • I can't open Pages or access any of the documents. I can't even reinstall Pages online. Very unpleasant!!!

    I suddenly can't open Pages or access any of my .pages documents. I can't even reinstall Pages online. Very unpleasant!!!

    Hi Peter
    Thanks for your reply
    Pages Version 5.1 installed recently online.
    I quit Pages 3 days ago with the document I was working on.
    I tried to open it today and no way to open Pages. Even rebooting my iMac.
    It seems to be corrupted.
    I cannot even reinstall Pages.
    Thanks for your attention
    Hope you will find a reply to my problem
    Claude Martin

  • URGENT:How can we submit a web page containing form using Java API?

    Dear Friends,
    I want to submit a form to a form action page resides in a web site. Then I need to get the response of the same.
    Is there any way to do this automatically by using Java API.
    Does java.net have anything?
    Thanks in advance
    Sarath

    Have you looked at a package called httpunit.
    http://httpunit.sourceforge.net/
    This allows form submission, Javascript, cookies etc.

  • Can't read pages in ff4, I want firefox 3.6 baack, how do I get it?

    I upgraded to Firefox 4 and it shrunk the print on my pages where I cannot read it. Two minutes earlier it was fine with firefox 3.6 so give me back 3.6. I didn't see anything in 4 I gave a crap about just clutter and garbage so I want my old firefox back.

    try this:
    go to TOOLS then OPTIONS then ADVANCE then in UPDATE session go to AUTOMATICALLY CHECK FOR UPDATE TO and '''untick''' FIREFOX then go to WHEN UPDATES TO FIREFOX ARE FOUND and '''untick '''AUTOMATICALLY DOWNLOAD AND INSTALL THE UPDATE press OK to save changes. Restart firefox.
    thank you
    If this reply solves your problem, please click "Solved It" next to this reply to close the topic.

  • The last few weeks everything I print off a web page prints so small that I can barely read it. It used to print pages fine until 2 - 3 weeks ago when I upgraded Firefox. The same page prints fine in Internet Explorer.

    This started after I upgraded Firefox to the last version before 8.0.

    This has happened for me as well. When I checked the settings (File > Page Setup > "Format & Options": Scale ), the Scale value was 40%. I changed it to 100%.
    Today, I realized that the Scale option in Print Preview also sets the Scale value in the Page Setup. My expectation was that it was a temporary setting for a specific print request, however, it is a sticky setting.

  • How can I read a pdf file using an ALC process

    I have a pdf form with a schema, I want to read the pdf form in to an xml with same schema so that i can process the data  that i get from the pdf file.
    I have tried the following
         I have created an input document variable (where i ll give my pdf form as input)
    I have created an output xml variable with the same schema as the input pdf document.
    I have created a process with set value service which assign the input pdf into the xml variable(so that i ll get the data from the pdf in to xml)
    Is the above approch is correct ..
    If any one knows, please suggest an approch to read my pdf.
    Thank You

    The fact that you have used a schema merely meand that the submission of the form data will be in the format defined by the schema. Generally when you submit the form you associate an XML variable in the user step to recieve that data (this assumes that your form is setup to submit xdp data). If you associate your schema with that XML variable you will be able to expand and see teh structure of your schema when using SetValue services etc. If you are merely interested in getting what was submitted (say to validate the data against the schema) you will have to assign the inbound data to another variable and remove the outer nodes that were added for our internal purposes (xfa.datasets.data). This is done in a setValue where you woudl use an XPath expresion of xfa/datasets/data/* (meaning that all nodes below the data norde are copied to the named variable.
    Hope that helps
    Paul

  • Can't read my container

    hi everybody,
    i am working with the teststand API und C#, and i have following problem:
    i wrote a programm that automatically create a sequence , and insert a container as Parameter in this sequence. The problem is that i can't access the elements of my container when i try to work with that sequence manually.
     Sure i can see the, container and the elements but when i try an assignment Teststand throws an Error. I don't understand why it is like that. here are the properties i am using to create the container and insert it in the sequence:
    //get the "parameters" property object
    PropObjParametersCallBackMainSequence =PropObjCallBackMainSequence.GetPropertyObject("Parameters", 0);
    //create Parameter Limits and get his Property object
    PropObjParameterLimits = EngineObj.NewPropertyObject(PropertyValueTypes.PropValType_Container, false, "Limits", 0);
    // add the parameter Limits in the "Parameters" of the callback sequence file
    PropObjParametersCallBackMainSequence.SetPropertyObject("Par_", 1 , PropObjParameterLimits);
    //save the callback sequence
    CallbackSeqFile.Save(SaveLocation + "\\" + TestName + ".seq");
    Limits is the name of the container type i've defined. Limits contains 3 elements : upperLimit, LowerLimit, and Unit.
    I hope somebody can help me.
    regards,
    Noubissi
    Teststand 3.5
    Visual Studio 2005

    Noubissi,
    you tell us that TestStand throws an error. What kind of error is that? what does it satet?
    Another thing is, if the code sniped displayed above is all the code
    regarding generating and inserting the parameter into your sequence,
    you will have problems to access subproperties for sure since there are
    none in the container. you will have to generate subproperties for the
    container before trying to access them....
    Norbert B.
    NI Germany
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How can I select pages to print from a Word document using the report generation 'print report' vi?

    I have researched the knowledge base and found:
    Printing A Range of Pages or Number of Copies of a Report Using the Report Generation Toolkit in LabVIEW.
    This seems to be from a previous version of LV. I am using LV2010. The instructions given do not match up with the current vi. The information did provide a tip and drilling down into  the vi I was able to insert the from/to page numbers at the printout invoke method, however this prevents the print function from working in that it can no longer find the default printer.
    The error message is:
    Error 1015 occurred at NI_ReportGenerationToolkit.lvlib:Word_Print.vi -> NI_Word.lvclassrint Report.vi ->
    error 1015 is: Printer is not responding. Check printer configuration.
    Any ideas how I can make the modification to print, for example, pages 24 through 29 out of a 32 page word document?
    Thanks,
    Chris

    Hello, take a look at this article. Unfortunately the Generate Report Get Data to Modify.vi was remove since RGT 1.1.3 release. That being said, we can try to find a workaround. See "Configuring a Printer Through the Windows Dialog in LabVIEW", open the GetPrinterSettings.vi, at the PrinterSettings property node you can select the from/to page. I hope this helps.
    Alejandro | Academic Program Engineer | National Instruments

Maybe you are looking for