0 Replies Latest reply on Jan 22, 2013 7:26 AM by Brendan B.

    Trouble getting the socket object to work

    Brendan B.

      I'm trying to pull an external XML file into InDesign, so I know I need to use the Socket object. I went to the documentation and copied/pasted the code from there:

       

      reply = "";
      conn = new Socket;
      // access Adobe’s home page
      if (conn.open ("www.adobe.com:80")) {
      // send a HTTP GET request
      conn.write ("GET /index.html HTTP/1.0\n\n");
      // and read the server’s reply
      reply = conn.read(999999);
      conn.close();
      }

       

      When I ran it, I received this error message:

      http://i.stack.imgur.com/qGg6U.jpg

       

      So, I'm stuck! Either Adobe's code sample has an error, or, more likely, there's something wrong on my end. If I had to guess, I'd guess that it's some kind of proxy problem, but I don't know for sure and don't know how to find out.

       

      Can anyone help? The principles of the Socket object make sense to me, but if I can't get even the sample to work, I don't really have anywhere to go with this.