一个优秀的 SOAP C++ 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/450488/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 15:25:02  来源:igfitidea点击:

A Good C++ Library for SOAP

c++web-servicessoap

提问by knaser

What are the alternatives for SOAP development in C++? Which one do you prefer and is most supported/modern?

在 C++ 中进行 SOAP 开发的替代方案是什么?您更喜欢哪一个并且最受支持/最现代?

采纳答案by Ma99uS

Check out Apache Axis. That is my all times favorite SOAP implementation. It's SOAP done right! Exists for C++ and Java.
http://ws.apache.org/axis/
And in best traditions of Apache Foundation, it is FREEand OPENSOURCE.
So, enjoy!

查看Apache 轴。那是我一直以来最喜欢的 SOAP 实现。SOAP 做对了!存在于 C++ 和 Java。
http://ws.apache.org/axis/
按照Apache Foundation 的最佳传统,它是免费开放的
所以,享受吧!

回答by JamieH

I had to make SOAP calls for a project a while ago and the only acceptable solution I found was GSOAP.

不久前我不得不为一个项目进行 SOAP 调用,我找到的唯一可接受的解决方案是 GSOAP。

http://www.cs.fsu.edu/~engelen/soap.html

http://www.cs.fsu.edu/~engelen/soap.html

It supports both C and C++ code, although working with C++ is nicer and easier to understand. It worked ok although there was an incompatibility with our WCF web service which meant we had to manually edit the automagically generated source code.

它支持 C 和 C++ 代码,尽管使用 C++ 更好,更容易理解。尽管与我们的 WCF Web 服务不兼容,这意味着我们必须手动编辑自动生成的源代码,但它工作正常。

回答by TJ Bandrowsky

If you are writing for Windows, Microsoft has a utility that comes with the Windows 7 SDK (And visual studio 2013 and later) called WSUTIL. It generates C proxies given a WDSL file, as shown in this example.

如果您正在为 Windows 编写代码,Microsoft 有一个随 Windows 7 SDK(以及 Visual Studio 2013 及更高版本)附带的实用程序,称为 WSUTIL。它生成给定 WDSL 文件的 C 代理,如本例所示。

http://msdn.microsoft.com/en-us/library/windows/desktop/gg288974.aspx

http://msdn.microsoft.com/en-us/library/windows/desktop/gg288974.aspx

回答by antonio

KD Soap if you are in Qt C++. This is the URL https://www.kdab.com/kd-soap/

如果您使用 Qt C++,KD Soap。这是网址 https://www.kdab.com/kd-soap/

回答by Sean Edwards

I stumbled on gsoap awhile ago, but I wasn't a huge fan of its interface and code generator. And as I remember it, the documentation is significantly lacking (or at least in a very difficult format).

不久前我偶然发现了 gsoap,但我不是它的界面和代码生成器的忠实粉丝。正如我所记得的,文档非常缺乏(或者至少是一种非常困难的格式)。

Sometime in the near future, though, this librarymay be adding sockets support. At least, I suggested it to the developer some time ago and he seemed to think it was the idea, and a few months later an XML parser showed up in the API. I'm a big fan of that library, and would definitely use it more if it wasn't GPL.

不过,在不久的将来,这个库可能会添加套接字支持。至少,我前段时间向开发人员提出了它,他似乎认为这是一个想法,几个月后,一个 XML 解析器出现在 API 中。我是那个库的忠实粉丝,如果它不是 GPL,我肯定会更多地使用它。

回答by Thomas Hansen

SmartWin++have a side-project called SmartSOAP which is pretty neat I think, it features a pretty complete stack starting from SocketStream, working its way up to HttpRequest/Response objects. Features a small (to the job) XML DOM class abstraction and goes up to SOAP. It even comes with a WSDL parser to create proxy classes for you. It heavily uses templates and STL. And is pretty awesome C++. Works on Windows Mobile...

SmartWin++有一个名为 SmartSOAP 的副项目,我认为它非常简洁,它具有一个非常完整的堆栈,从 SocketStream 开始,一直到 HttpRequest/Response 对象。以一个小的(工作的)XML DOM 类抽象为特色,并上升到 SOAP。它甚至带有一个 WSDL 解析器来为您创建代理类。它大量使用模板和 STL。并且是非常棒的 C++。适用于 Windows Mobile...

Though it isn't extremely rich, doesn't feature stuff like SSL and such. But since the code is pure art I would guess it could easily be understood and extended upon yourself...

虽然它不是非常丰富,但没有像 SSL 之类的东西。但由于代码是纯粹的艺术,我想它很容易被你理解和扩展......

License is New BSD...

许可证是新的 BSD ...

Disclaimer; I implemented it...

免责声明;我实现了...