Print

Print


> 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???

I think you are on the right track with an XML/HTTP solution.

My personal feeling is that HTTP will have to be extended to make it a
full-fledged protocol suitable for "real" distributed computing. The good
news is that since XML will do much of the work with respect to defining
objects and object relationships, and (eventually) data typing, and since
marshalling is not much of a problem if what you're doing is sending strings
around, the simplest version of the protocol would do exactly what you said:
send an XML request, and receive an XML response: either the desired result
or an XML "exception" explaining what went wrong. Even transaction and
security contexts, etc could be modelled as part of the document.

                                        Peter