您会推荐哪个SOAP XML对象序列化库? [英] Which SOAP XML object serialization library for Java would you recommend?

查看:189
本文介绍了您会推荐哪个SOAP XML对象序列化库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您将推荐哪些Java SOAP XML对象序列化库与其他平台/语言(.NET,Delphi)的 Java对象交换

Which Java SOAP XML object serialization library would you recommend for Java object exchange with other platforms / languages (.NET, Delphi)?

通信场景可能如下所示:

Communication scenarios could look like this:


  • Java对象编写器 - > SOAP XML文本 - > .NET或Delphi对象读取器

  • .NET或Delphi对象编写器 - > SOAP XML文本 - > Java对象读取器

我知道有XStream XML序列化库和JSON作为替代解决方案,但是由于Delphi和.Net内置了对SOAP XML序列化对象的支持,因此可以提供标准化的方式来支持嵌套对象,数组等高级功能。

I know there is the XStream XML serialization library and JSON as alternative solutions, however since Delphi and .Net have built-in support for SOAP XML serialized objects, this would offer a 'standardized' way with support for advanced features like nested objects, arrays and so on.

编辑:
同时我发现 JAXB - ( https://jaxb.dev.java.net/ ), JAXMe JiBX - 将XML绑定到Java代码( http://jibx.sourceforge.net/ )。但是,默认情况下,它们不会生成SOAP序列化的XML。

Meanwhile, I found JAXB - (https://jaxb.dev.java.net/), JAXMe, and JiBX - Binding XML to Java Code(http://jibx.sourceforge.net/). But they do not generate SOAP serialized XML by default.

可能的解决方案是可以在没有HTTP服务器的情况下运行的Web服务库,并提供一个简单的文件接口为SOAP XML内容(不是一个完整的请求,只是一个序列化的对象)。 轴2 CXF 看起来很有趣。

A possible solution would be a web service library which is able to run without a HTTP server, and offers a simple file interface for the SOAP XML content (not a complete request, just a serialized object). Axis 2 and CXF look very interesting.

推荐答案

我更喜欢JAX -WS(与JAXB 2.1数据绑定)在我使用的其他自由派(JAX-RPC,轴1和2,但不是XFire)。 JAXB 2数据绑定使用泛型,这使得具有maxoccurs> 1的属性的愉快映射。JAX-WS本身有相当有效的记录,并提供了相当不错的API。在某些情况下,方法和参数注释可能会失控 - XML地狱注释形式。它通常不是那么糟糕。

I prefer JAX-WS (with JAXB 2.1 databinding) over the other liberaries I've used (JAX-RPC, Axis 1 and 2, but not XFire). The JAXB 2 databinding uses generics, which makes for a pleasant mapping of properties with a maxoccurs > 1. JAX-WS itself is reasonably well documented and provides a reasonably good API. The method and parameter annotations can get a bit out of hand in some cases - XML hell in annotation form. It usually isn't so bad.

JAX-WS堆栈的一个很好的方面是Project Metro,Sun与Microsoft共同开发,并与Web服务支持.NET 3.0,以可行的方式实现MTOM。

One of the nice aspects of the JAX-WS stack is project Metro, which Sun co-developed with Microsoft and interoperates well with the web service support .NET 3.0, going so far as to implement MTOM in a workable fashion.

这篇关于您会推荐哪个SOAP XML对象序列化库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆