开发者

Delphi SoapServer application

Is it possible to convert Delphi SoapServer ap开发者_运维知识库plication to use TCP/IP?


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:

  • Remobjects: http://www.remobjects.com/
  • kbmMW: http://components4developers.com/


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜