gSOAP 是否有 Objective-C 包装器?

发布于 2024-07-10 00:57:37 字数 638 浏览 12 评论 0原文

我将使用 gSOAP 与我的 Mac 项目中的 WCF Web 服务交互。 它几乎完全符合我的需要,而且做得很好(与 WSMakeStubs 几乎完全相反;))。 唯一的缺点是它仅限于 C/C++,这意味着我要么需要将所有类型即时转换为 C 类型,要么编写一个完整的包装解决方案来为我完成此操作。

我不想在这里重新发明轮子,我是 显然不是 一个谁想这样做,但到目前为止我还没有找到任何人真正发布了任何代码来实现这一效果。

有谁知道任何可用的代码可以让我不必自己编写整个事情?

I'm going to use gSOAP to interact with a WCF webservice in my Mac project. It does pretty much exactly what I need and it does it well (pretty much the exact opposite of WSMakeStubs;)). The only downside is that it's C/C++ only, meaning I either need to convert all my types into C types on the fly or write a complete wrappering solution to do it for me.

I'd rather not reinvent the wheel here, and I'm obviously not the only one who has wanted to do this, but so far I haven't been able to find anybody who has actually posted any code to this effect.

Does anybody know of any code available that would save me from having to write the whole thing myself?

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

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

发布评论

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

评论(3

最初的梦 2024-07-17 00:57:37

(它并没有完全回答你的问题,但是)我使用了 Cocoa SOAP Client 中使用的技术(开源)连接到服务器并发送/接收 SOAP 请求。 它工作得非常好,除非您连接到具有自签名 SSL 证书的服务器。

(这基本上将 XML 结构转换为原生 Cocoa 结构,并在发送时以另一种方式返回)。

我们在工作中使用 gSOAP,它可以完成工作,但会生成大量生成代码,并限制您以特定方式处理数据。

(It doesn't quite answer your question, but) I've used the techniques used in Cocoa SOAP Client (open source) to connect to a server and send/receive SOAP requests. It works really well, unless you are connecting to a server with a self-signed SSL certificate.

(This basically translates XML structures into native Cocoa structures, and back the other way on sending).

We use gSOAP at work, and it does the job, but makes lots of generated code, and limits you to working in particular ways with the data.

独享拥抱 2024-07-17 00:57:37

我正在开发一个包装器生成器(或者可能对 gSOAP 本身进行修改以做出贡献); 我还没有完成,并且暂时不会完成。

注意:我是您链接到的人之一。

I'm working on a wrapper generator (or possibly modifications to gSOAP itself to contribute back); I'm not done and won't be for a little while.

Note: I'm one of the folks you linked to.

北陌 2024-07-17 00:57:37

我想说目前的答案是“否”。

我最终主要为我的 Web 服务手动创建了一个 Objective-C 包装器(包括 NSArray 的类别方法,用于将 X 的 NSArray 转换为 X 的肥皂数组,反之亦然,等等),因为它是一次性的,我做了不要指望它会特别频繁地改变。 我对此很满意,但每当更改签名或添加方法时,我确实需要手动修改它。

I'd say the current answer is "No".

I ended up creating an Objective-C wrapper mostly by hand for my web service (including category methods for NSArray to translate an NSArray of X into a soap array of X and vica versa, etc) since it was a one-off and I did not expect it to change particularly often. I'm happy with it, but I do need to modify it by hand whenever a signature is changed or a method is added.

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