在 Linux 上编写 SOAP 服务 - 需要工具和帮助

发布于 2024-09-17 04:54:30 字数 183 浏览 2 评论 0原文

我需要为 Linux (CentOS) 编写 SOAP 服务。

我需要使用 Lazarus/FreePascal 来完成此操作。该服务需要是在后台运行的二进制文件(守护进程)。

问题: 1. 这可能吗(作为独立的可执行文件)? 2. 如果没有,有哪些替代方案? 3. 我该如何开始? 4. 我还需要哪些额外的工具/库?

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

I need to do this using Lazarus/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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

櫻之舞 2024-09-24 04:54:31

这对于 wst 和 synapse 或 indy 是可能的。 wst 已包含在您的 Freepascal 下载中。还有一些示例,请看一下。

我用 wst + freepascal 创建了几个肥皂服务。您可以选择让他们使用自己的网络服务器(这样他们只侦听某个端口,允许进行简单的调试)或创建一个可以在 Apache 或 IIS 中使用的 cgi 模块。您还可以通过切换一些参数或包含一些其他文件来创建 Windows 服务或 Linux 守护程序。

如果你是第一次这样做,这并不容易,但肯定是可能的。

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.

琉璃繁缕 2024-09-24 04:54:31

我可以回答你的一些观点,因为我自己在做:

  1. 使用 Lazarus 并安装 LazDaemon 包,你可以做在 Windows(服务)和 Linux(守护进程)上独立编译和运行的守护进程/服务。 守护进程和服务
  2. N/A
  3. 您在 [fpc-source-dir] 下有示例/packages/fcl-base/example/daemon.pp[lazarus-dir]/examples/cleandir/*
  4. 您将需要某种我不熟悉的 SOAP 框架希望

有帮助。

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.

独留℉清风醉 2024-09-24 04:54:31

看起来很有希望,至少作为一个开始。

SOAP 是一种语言中立的规范,因此理论上您可以使用任何语言进行编码。但出于您的目的,如果您找不到 pascal 中的库来完成繁重的工作,那么您最好使用任何其他语言。除非您专门想绕道 WSDL 之类的兔子洞,否则不要去那里。

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.

平安喜乐 2024-09-24 04:54:31

帕斯卡真的有要求吗?

否则,您可以用 Java 编写 SOAP 服务,那么您的服务将与平台无关。
唯一的要求是 JRE,并且 JRE 可用于任何平台,因此它可以在所有 Linux 版本、WIndows、Mac OsS、Solaris 等上完美运行。

还有很多用于在 Java 中执行 SOAP 的框架。

Pascal 也可以在 Linux 和 Windows 上运行,只需进行一些小的调整,但我不知道 Pascal 现有的良好 SOAP 框架。

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.

谈下烟灰 2024-09-24 04:54:31

我只会使用 Indy,以及谷歌搜索产生的任何 Delphi 肥皂库。如果没有十几个我会感到惊讶。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文