> What I want to do is the following: Let's supposed I have two Java
> Web Servers (or Application servers or whatever), and they are in
> two different geographical locations.
> I want them to use XML as their communications protocol, on top of
> HTTP. So that for example one side asks the other for sales info,
> and the other replies with the sales info. All this request and
> reply happens via XML with my own tags.
> My question was, I know how to parse XML now, but how do I go about
> dynamically creating the XML (easy) and sending it to the other
> side via HTTP? and then have the other side listen on the HTTP
> port, realize I'm sending XML, and pass the stream to the XML
> decoder???

Aaaah. Sound of light dawning...

This looks like a need for a server-to-server protocol, rather like
LISTSERV servers pass management messages between themselves behind
the scenes.

If a server was busy handing out files to users, I think I'd rather
run another, different server to handle incoming files. It could still
run HTTP, of course, but it would sit and wait for an incoming file
(which it is presumably expecting because it sent a request for it a
short while before, and the file has been manufactured by another
server elsewhere).

Hmmm. I think we need some thinking here.