ADVICE Needed (XML/HTTP) urgently 
Author Message
 ADVICE Needed (XML/HTTP) urgently

Hi There,

I have 1 week to come up with a way to have XML data exchange over HTTP.
Over the internet I receive an XML document. This data I must parse and send
to the serial port.

I also need to read the serialport and whenver I receive something, I must
send this data in XML format to some URL.

I would like it to be easily portable to unix, however, time-pressure makes
me think I should try to use as much ready-to-use technologies.

So I must do 2 things:
1) when I receive XML data, I must send this to the serialport. (let's call
this the SERVER)
2) when I receive something on the serialport (I must continously poll the
hardware connected to the serialport) I must send this data in XML form to
some URL (HTTP). (let's call this the CLIENT)

To receive XML data, I could use a regular webserver, with an ASP page to
process the XML data. But the problem would be the serial port
communication. Since ever HTTP request may cause the ASP or other CGI script
to be called more than once simultaneously, it would cause problems opening
the serialport and closing it again. So this method would not work.

Also, for the client (point 2 above) the serialport should be open at all
times.

So I think I need to make my own little webserver (or find one on the net)
and client software that implements all of the HTTP over TCP/IP stuff, which
can open the serialport and leave it open and allow 2 way communication at
all times. This is to RECEIVE http posts. But to send XML out over HTTP
myself, I probably need to use some MFC class (CHttp or something) or
CSocket to send out.

Or do you think all or part of the above can be done easier with simple
scripting languages?
I am a C++ person, and don't know about other technologies out there and
what they can do for me such as ASP, COM/ActiveX etc. What other options do
I have to implement the above without spending too much time learning
Microsoft specific technologies? If you can point me at code-snippets, that
would be great. I have seen many simple examples where XML data is exchanged
over HTTP using ASP, but that leaves me with the problem of serial
communication.

Any advice would be very much appreciated,
Lisa



Mon, 01 Sep 2003 00:54:41 GMT  
 ADVICE Needed (XML/HTTP) urgently
Hi,

It might be heretical to mention a different language than JScript in the
JScript newsgroup, but for such a 'glue' application, I can't help but
mention python or Perl (my preference is Python, so all further comments by
be refer to its capabilities)

Python can be run as cgi-script from Apache as the Webserver, and versions of
Apache run on most common platforms.

As far as the serial port stuff goes, Python lets one manipulate them easily,
through the core language, or through extensions by Mark Hammond for Win32
specifically.

Contention for the serial port can be handled through a file-locking
mechanism, or any other form of inter-process communication (all of which are
readily available through Python, of course)

Oh, did I mention that Python scripts run on both Win32 and Linux/Unix
platforms? :)

Duane Kaufman
(remove the NO_|SPAM in the sig)

My ramblings have nothing to do with my employer


Quote:

>Hi There,

>I have 1 week to come up with a way to have XML data exchange over HTTP.
>Over the internet I receive an XML document. This data I must parse and
send
>to the serial port.

>I also need to read the serialport and whenver I receive something, I must
>send this data in XML format to some URL.

>I would like it to be easily portable to unix, however, time-pressure
makes
>me think I should try to use as much ready-to-use technologies.

>So I must do 2 things:
>1) when I receive XML data, I must send this to the serialport. (let's
call
>this the SERVER)
>2) when I receive something on the serialport (I must continously poll the
>hardware connected to the serialport) I must send this data in XML form to
>some URL (HTTP). (let's call this the CLIENT)

>To receive XML data, I could use a regular webserver, with an ASP page to
>process the XML data. But the problem would be the serial port
>communication. Since ever HTTP request may cause the ASP or other CGI
script
>to be called more than once simultaneously, it would cause problems
opening
>the serialport and closing it again. So this method would not work.

>Also, for the client (point 2 above) the serialport should be open at all
>times.

>So I think I need to make my own little webserver (or find one on the net)
>and client software that implements all of the HTTP over TCP/IP stuff,
which
>can open the serialport and leave it open and allow 2 way communication at
>all times. This is to RECEIVE http posts. But to send XML out over HTTP
>myself, I probably need to use some MFC class (CHttp or something) or
>CSocket to send out.

>Or do you think all or part of the above can be done easier with simple
>scripting languages?
>I am a C++ person, and don't know about other technologies out there and
>what they can do for me such as ASP, COM/ActiveX etc. What other options
do
>I have to implement the above without spending too much time learning
>Microsoft specific technologies? If you can point me at code-snippets,
that
>would be great. I have seen many simple examples where XML data is
exchanged
>over HTTP using ASP, but that leaves me with the problem of serial
>communication.

>Any advice would be very much appreciated,
>Lisa

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Mon, 01 Sep 2003 21:45:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADVICE Needed (XML/HTTP) urgently

2. Need Advice Urgently

3. NEED ADVICE URGENTLY - msvbvm50.dll caused error...

4. Reporting off XML file with Crystal Enteprise 8.0 : Help Needed Urgently

5. advice urgently appreciated

6. advice urgently appreciated

7. I need urgently need help

8. Working with XML via HTTP

9. XML HTTP question...one more try

10. XML http request in synchronous mode

11. HELP - got to send an XML file from iPAQ to web via HTTP POST

12. Need help urgently, please.

 

 
Powered by phpBB® Forum Software