Re: Exchanging information



On Fri, 27 Jul 2007 19:31:19 GMT, Haggis McMutton
<haggis@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :

I want to extend this to something a bit more advanced. I was thinking of
using XML but someone said I should use SOAP, but that uses HTTP which
seems to complicate things. Any ideas on the best way to do this?

The problem with a roll your own protocol is you are constantly
tinkering with it. It is endless busywork adding new fields and
adjusting the "parser". It gets hairy as soon as you have any sort of
nested or array data.

The problem with serialised objects is both ends have to be running
the exact same version of the class files. On the plus side, if you
compress the stream, you get a quite compact binary stream. You can
send arbitrary trees of data, without any coding. On the downside, it
is very easy to send all kinds of crap tacked onto your tree you did
not intend. I like to look at my streams with a hex editor to see
what classes are in there. If I see any I did not expect I know I have
inadvertently included something.

One trick I have taken in putting the serial UID of the most crucial
class in the Long at the head of the stream. You can always read
this, then give a reasonable error message if it is not what you
expected.

The biggest problem with serialised objects is they go stale the
instant you change your source code. They are not good for long term
storage. You must be able to recreate them after source code changes.
Writing code to upgrade a object file is quite tricky.

SOAP helps you waste bandwidth if you have invested in companies like
AT&T and Cisco. Amazon offers a SOAP interface which can be
considered somewhat language agnostic. It can't see any advantage to
a pure Java implementation.


--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Getting soap configuration to work
    ... ' Define a SOAP Extension that traces the SOAP request and SOAP response ... Private oldStream As Stream ... Public Overrides Function ChainStreamAs ... ByVal attribute As SoapExtensionAttribute) As Object ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Inserting a SOAP Header in a client request
    ... Every Soap based ... So all you need to do is write to the chained stream using an xml writer. ... custom SoapHeader and modify the ws client proxy by hand to ... > SoapMessage before adding the soap header but that would be ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Importing XML through .NET Web Service with VBA
    ... Dim objSClient As MSSOAPLib30.SoapClient30 ' soap object to access and expose web service interface ... ' Call the web service and load requested XML document in to MSXML DOM document structure ... ' save xml document from web service to stream ...
    (microsoft.public.excel.programming)
  • Re: Error on web service: "Server returned internal error 500"
    ... Why dont you use microsoft soap toolkit for intercepting the ... going on when web services correspond with each other (or other ... Stream sendStream = httpReq.GetRequestStream; ...
    (microsoft.public.dotnet.framework.webservices)
  • Regarding Pro Knolegdge and guidence about TCP/IP in Embedded system
    ... As i am an last year student of ME stream I am doing my Final Year ... project in Embedded system As ur company also work on same domain with ... also work on this i need ur help and guidence. ... have any implemented source code ...
    (codewarrior.embedded)