开发者

Writing a SOAP service on Linux - tools, help needed

I need to write a SOAP service for Linux (CentOS).

I need to do this using Laz开发者_如何学Goarus/FreePascal. The service needs to be a binary (daemon) that runs in the background.

Questions: 1. Is this possible (as a standalone executable)? 2. If not, what are the alternatives? 3. How do I start? 4. What additional tools/libraries do I need?


This is possible with wst and either synapse or indy. wst is alsready included in your Freepascal download. There are some samples included as well, have a look at them.

I have created several soap services with wst + freepascal. You can choose to have them use their own webserver (so they just listen on a certain port, allows for simple debugging) or create an cgi module that you can use in Apache or IIS. You can also create a windows service or linux daemon, all by switching some parameters or including some other files.

It is not easy if you do it for the first time, but certainly possible.


I can answer some of your points since I'm doing it myself:

  1. Using Lazarus and installing the LazDaemon package you can do daemons/services that compile and run stand alone on both Windows(Service) and Linux(Daemon). Daemons and Services
  2. N/A
  3. You have examples under the [fpc-source-dir]/packages/fcl-base/example/daemon.pp and under [lazarus-dir]/examples/cleandir/*
  4. You will need some kind of SOAP framework that I'm not versed in.

Hope it helps.


This looks promising, at least as a start.

SOAP is a language neutral specification so in theory you could code in any language. But for your purposes if you can't find a library in pascal that does the grunt work you would be better off using any other language that does. Unless you are specifically looking for a long detour down the rabbit hole of WSDL and such, don't go there.


Is Pascal really a requirement??

Otherwise, you could write a SOAP service in Java, then your service would be platform agnostic. The only requirement would be a JRE, and JRE are available for any platform, so it would run perfectly on all Linux flavors, WIndows, Mac OsS, Solaris, etc

There are also plenty of frameworks for doing SOAP in Java.

Pascal would also be able to run on Linux and Windows with minor adjustments, but I have no knowledge of existing good SOAP frameworks for Pascal.


I would just use Indy, and whatever Delphi soap lib a google search yielded. I would be surprised if there weren't a dozen.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜