Discussion:
XML with Sockets
(too old to reply)
Magno Lima
2008-08-07 14:45:48 UTC
Permalink
Hi!

I need do create a simple application that responds as a webserver. The
response should seems like a XML. Actually I already doing that but the
client side gets some trouble and I guess it is due some header information
missing. Basically my code is all treated on a ServerSocketClientRead().

If I test by using Firefox/IE it works fine, full compliance, but the client
side is getting wrong. Simulating a HTTP 80 service is fine, I send such
HTTP/1.1 200 OK strings and complete my code. With XML, is there any special
header required? (I guess so) If I try some then the web browers get
strangers responses, if I simple start with:

Socket.SendText('<?xml version="1.0" encoding="ISO-8859-1"?>'#10#13);

all goes fine but the client application... As I told, when I need to do
http server I start with:

Socket.SendText('HTTP/1.1 200 OK'#10#13);

and also all runs OK.

Please help!! :D

Magno
Remy Lebeau (TeamB)
2008-08-07 16:41:30 UTC
Permalink
Post by Magno Lima
If I test by using Firefox/IE it works fine, full compliance, but the
client side is getting wrong.
Web browsers simply display what they are given. That does not mean the
data is accurate.
Post by Magno Lima
Simulating a HTTP 80 service is fine, I send such HTTP/1.1 200 OK
strings and complete my code. With XML, is there any special header
required?
XML by itself, no. But it sounds like the client is actually trying to use
SOAP instead, which is XML over HTTP, so you would need full HTTP headers as
well as SOAP envelopes for the XML data.


Gambit

Loading...