tags:

views:

108

answers:

3

Is it possible to convert Delphi SoapServer application to use TCP/IP?

Regards

Sandeep

A: 

If you're talking about pre-Delphi 2009 DataSnap, meaning COM based DataSnap, then you have to use a third layer utility to do the communication. That utility named sockets.exe is included with Delphi, and is in the same dir as Delphi (Program Files\\\\bin

If it is Delphi 2009 or better, then DataSnap has built-in TCP/IP functionality. You use TDSTCPServerTransporter component.

Update: Ups! for some reason I did read DataSnap SoapServer (wich neither exists, but I did think of Soap Connection). A Soap Server Application needs the "server" part, meaning a web server. SOAP is an technologie that runs over HTTP protocol, so I don't think it could be "converted". DataSnap could do the job, or Indy TIdTCPServer or some of the derived classes.

SalvadorGomez
`DataSnap <> SoapServer`
mjustin
Side note: Soap is not bound to HTTP and web servers. Soap over SMTP, JMS or UDP are well known examples.
mjustin
A: 

From your comment to your question it sounds like you are looking to get rid of SOAP, and use something else to communicatie over a TCP/IP connection.

The question one could ask is why do you want to convert to non-SOAP comm over TCP/IP?

But the answer to whether it is possible is: of course this is possible, there are many application servers using TCP/IP for communication without using SOAP as their communication's protocol.

You will need some kind of protocol for communication between server and clients. You could roll your own, but doing what SOAP is doing for you now: receiving and responding to commands from clients (or method invocation) and marshalling data/objects between server and clients is not a trivial task.

So I'd suggest you have a look at other remoting libraries for client/server communication, such as:

Marjan Venema
A: 

As others have said, SOAP is just XML on http/https, and usually does already use TCP. That said, you could simply treat it as raw socket data or http data. i.e. you could make a client that just uses http POST to send a string to the server. The string would contain an XML SOAP request, and would be treated by the server as if it were SOAP. Likewise, you could build the server in a non-SOAP fashion, just accepting XML and returning XML, and the client wouldn't know the difference.

You can use Fiddler2 to play with this. You can build requests and send them via HTTP Post. The server has no idea that you're not a SOAP client.

Chris

Chris Thornton