C 和 C++ 中的 Web 服务
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6542676/
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
Web Services in C and C++
提问by mainstringargs
I want to host web services in an existing C/C++ application. What is the best solution?
我想在现有的 C/C++ 应用程序中托管 Web 服务。最好的解决方案是什么?
I would like a solution similar to what JAX-WS does for Java. Specifically revolving around SOAP requests.
我想要一个类似于 JAX-WS 为 Java 所做的解决方案。专门围绕 SOAP 请求。
Any personal experience with available solutions?
任何可用解决方案的个人经验?
回答by MK.
As far as I understand the most popular free solution is gSOAP http://gsoap2.sourceforge.net/
据我所知,最流行的免费解决方案是 gSOAP http://gsoap2.sourceforge.net/
回答by Alok Save
You should check out Apache Axisfrom Apache. It has a very nice SOAP implementation & will definitely qualify for one of the best.
It is free and opensource.
您应该从 Apache查看Apache Axis。它有一个非常好的 SOAP 实现并且绝对有资格成为最好的实现之一。
它是免费和开源的。
Also, have a look at Axis2/C, it is the C version of the Axis2 architecture, which is way more flexible than Axis1.
另外,看看 Axis2/C,它是 Axis2 架构的 C 版本,比 Axis1 更灵活。
回答by Zhen
I tested Pion at http://www.pion.org/. Deriving from its class pion::net::WebService
and create HTTP responses is pretty easy.
我在http://www.pion.org/ 上测试了 Pion 。从它的类派生pion::net::WebService
并创建 HTTP 响应非常简单。
回答by Eduardo Lago Aguilar
I think your best option is to use the WSO2 Web Services Framework for C++because:
我认为您最好的选择是使用C++的WSO2 Web 服务框架,因为:
- It's high-performance
- It's easy to integrate
- It's easy to use(Quick start guide)
- It have a lot of tools around: WSDL2CPP ( Code Generation tool ), tcpmon ( SOAP Message viewer ) and WSClient ( command line web services client )
- It have an organic support for WS-Security, WS-Security Policy, WS-Secure Conversation and WS-Reliable Messaging.
- And my favorite: Runtime management using WSO2 Carbon based Web Interface.
- 这是高性能
- 很容易集成
- 它易于使用(快速入门指南)
- 它有很多工具:WSDL2CPP(代码生成工具)、tcpmon(SOAP 消息查看器)和 WSClient(命令行 Web 服务客户端)
- 它有机地支持 WS-Security、WS-Security Policy、WS-Secure Conversation 和 WS-Reliable Messaging。
- 我最喜欢的是:使用基于 WSO2 Carbon 的 Web 界面的运行时管理。
See more features here.
在此处查看更多功能。
There are factual comparison resultsbetween WSO's WSF/C++and others Web services implementations with superior results in favor of WSF (2-3 times better performance).
WSO 的 WSF/C++和其他 Web 服务实现之间有事实比较结果,结果优于 WSF(性能提高 2-3 倍)。
WSO2 team and community is very active and the technologies provided by them are highly integrated each other and with 3rds via Open Standards. Documentationand examples are vastly.
WSO2 团队和社区非常活跃,他们提供的技术彼此高度集成,并通过开放标准与 3rds 高度集成。文档和示例非常多。
回答by Howard
There is no good alround solution out there for c++ web services as far as I can tell. gSoap works well, but it and has been maintained by one person, the original coder for it's life (high risk). WSO's WSF/C++ Was good but got ditched by WSO onto github with no maintainers! It's had no updates for years, and the current 'build' doesn't! If anyone can point me at a high performance c++ restful web service kit, with a reasonable prospect of being maintained. I'd appreciate it.
据我所知,对于 C++ Web 服务没有很好的全面解决方案。gSoap 运行良好,但它一直由一个人维护,这个人是它生命中的原始编码器(高风险)。WSO 的 WSF/C++ 很好,但被 WSO 抛弃到 github 上,没有维护者!它已经多年没有更新了,而当前的“构建”也没有!如果有人可以向我指出高性能的 c++ 宁静 Web 服务工具包,并且具有合理的维护前景。我会很感激。