使用 Java 实现高度互操作的 SOA 需要考虑哪些因素?

发布于 2024-11-17 16:57:32 字数 444 浏览 0 评论 0原文

自从有人问“已经过去两年多了您会推荐哪种 Java SOAP XML 对象序列化库?”并假设从那时起发生了很多事情,我相信这足以成为修改该主题的充分理由。

因此,在第一个分析中,我不是用 Java 实现 SOA,而是尽可能与 .NET Framework(或任何其他企业平台)进行互操作。我正在考虑使用 Apache Tuscany 但我想知道是否有任何理由不应该这样做?任何反馈都将不胜感激。

It's been more than two years since someone asked "Which SOAP XML object serialization library for Java would you recommend?" and assuming a lot of things changed since then, I believe that's enough of a good reason to revamp the topic.

So in lieu of implementing SOA in Java that will be as interoperable as possible with the .NET Framework (or any other enterprise platform for that matter), in a first analysis I'm considering going with Apache Tuscany but I was wondering if there's any reason I should not? Any feedback will be definitely appreciated.

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

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

发布评论

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

评论(2

浅唱ヾ落雨殇 2024-11-24 16:57:32

实际上,我首先要考虑的是“我真的需要 SOAP/XML 吗?”。

特别是:

  • WSDL 并不像建议的那样跨平台;很容易得到效果不佳的案例(本周早些时候在 PayPal 上有一个案例)
  • XML 是人类可读的...但结果相对较慢且臃肿

还有其他共享定义的方法- 例如,我们都可以使用一个 API 文档来管理“这个 API 返回这种形状的 JSON {...}”。 WSDL主要似乎可以帮助拖放开发人员;我不是其中之一。

因此,我建议查看更简单的(例如:YAGNI)协议。对于有效负载,我是 protobuf 的忠实粉丝,它故意采用更简单的模式,因此可以减少不同实现可以/不能处理什么的不确定性,同时仍然涵盖每个合理的用例。它也非常高效或者CPU/带宽都高效。 非常便携,并具有用于定义数据的架构定义语言 (.proto) ,但是比 WSDL 简单。震撼恐怖!它不是人类可读的...好吧,有一些工具可以做到这一点:)为什么要把我们周的失败和缓慢的基于肉体的单元强加在我们的 API 上?

Actually, the first consideration I'd make is "do I really need SOAP/XMl?".

In particular:

  • WSDL is not nearly as cross-platform as is suggested; it is very easy to get cases that don't work well (there was one here on SO re PayPal earlier this week)
  • XML is human readable... But as a result is relatively slow and bloated

There are other ways of sharing a definition - for example, we all manage just fine with an API document that says "this API returns JSON in this shape {...}". WSDL mainly seems to help drag-and-drop developers; of which I am not one.

As such, I suggest looking at simpler (think: YAGNI) protocols. For payload, I'm a big fan of protobuf, which deliberately is a simpler schema and therefore allows for much less uncertainty over what can/can't be handled by different implementations, while still covering every sane use-case. It is also very efficient or both CPU/bandwidth. Very portable, and has a schema definition language (.proto) for defining the data, but MUCH simpler than WSDL. Shock horror! It isn't human readable... Well, there are tools for that :) why impose the failings of us week and slow flesh-based units on our APIs?

初懵 2024-11-24 16:57:32

我们使用 metro 框架,到目前为止,它已被证明与 WCF 具有高度的互操作性,包括复杂的消息级安全性使用相互证书身份验证和用户名令牌。在我们的例子中,WCF 是服务器,Java 是客户端。

We use the metro framework and so far it has proven to be highly interoperable with WCF including complex message level security using mutual certificate authentication and username token. In our case WCF is server and Java is client.

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