简体   繁体   English

关于Java中肥皂处理的任何消息?

[英]Any news about soap handling in Java?

I've worked with Axis and Saaj for a few years, then I switched to spring-ws, which I prefer because it's more xml-oriented. 我和Axis和Saaj合作了几年,然后我转向spring-ws,我更喜欢它,因为它更像xml。 Then I switched all my projects to axiom due to a serious performance problem with saaj. 然后我将所有项目切换到公理,因为saaj存在严重的性能问题。 I've experienced some problems again later, especially related to namespace handling ( AXIOM-114 and SWS-502 ), anyway I've been working with spring-ws and axiom for two years. 我以后再遇到一些问题,特别是与命名空间处理( AXIOM-114SWS-502 )有关,无论如何我一直在使用spring-ws和axiom两年。

Since I'm not completely satisfied, I'm actually looking for any other libraries. 由于我并不完全满意,我实际上正在寻找任何其他库。 Any suggestions? 有什么建议?

I know google is my best friend, but this is a delicate matter, so I'd like to know your experience. 我知道谷歌是我最好的朋友,但这是一个微妙的问题,所以我想知道你的经历。 Actually, what's the best library to handle soap messages in Java? 实际上,用Java处理soap消息的最佳库是什么?

I could write my own library based on my needs, but I think this is not too easy and I don't like to reinvent the wheel. 我可以根据自己的需要编写自己的库,但我认为这不是太容易,我不喜欢重新发明轮子。 I just would like to rely on a library which correctly handles well formed xml, namespaces declaration, multiple levels of nested xml, and so on. 我只想依靠一个正确处理格式良好的xml,名称空间声明,多层嵌套xml等的库。

I'm actually looking for any other libraries. 我其实正在寻找其他任何图书馆。 Any suggestions? 有什么建议?

Well, SAAJ is still SUN's specification to handle SOAP (with attachments). 那么,SAAJ仍然是SUN的处理SOAP(带附件)的规范。
The reference implementation uses DOM so if you exchange big messages you would see memory issues. 参考实现使用DOM,因此如果您交换大消息,您将看到内存问题。
Other frameworks that support soap-based web services besides axis and spring (that you have already worked with) is cxf. 除了轴和弹簧(你已经使用过)之外,支持基于SOAP的Web服务的其他框架是cxf。
Axis uses axiom for the xml handling and has an implementation of SAAJ that I think it is not DOM-based. Axis使用公理进行xml处理,并且有一个SAAJ的实现,我认为它不是基于DOM的。 So better memory usage for large messages is expected. 因此,预计大型消息的内存使用会更好。
CXF uses by default the build-in java saaj implementation but can also support axis2-saaj CXF默认使用内置java saaj实现,但也可以支持axis2-saaj
CXF FAQ CXF FAQ

Last but not least is the JAX-WS (also relies on SAAJ). 最后但并非最不重要的是JAX-WS(也依赖于SAAJ)。
Both CXF and JAX-WS allow you to work directly on the xml level. CXF和JAX-WS都允许您直接在xml级别上工作。
This is pretty much the most popular frameworks for soap web services in java (If I forgot something I hope someone will come in and inform). 这几乎是java中肥皂网服务最流行的框架(如果我忘了某些东西,我希望有人会进来告知)。

what is the best library to handle soap messages in Java? 在Java中处理soap消息的最佳库是什么?

Hard to tell since this is pretty broad question. 很难说,因为这是一个非常广泛的问题。
Generally speaking the most popular frameworks are Axis2 and CXF (this is my personal understanding). 一般来说最流行的框架是Axis2和CXF(这是我个人的理解)。
IMHO all the libraries have the problem that they are too "sensitive" on input ie namespaces etc. 恕我直言,所有的库都存在问题,即它们对输入过于“敏感”,即命名空间等。
On occassion that the developer needs a more relaxed parsing, this is not easy to get. 在开发人员需要更轻松的解析时,这并不容易。

JAX-WS (and the reference implementation , aka Metro) uses data binding and stub generation to make SOAP calls, similar to how .NET generally does it. JAX-WS(和参考实现 ,又称Metro)使用数据绑定和存根生成来进行SOAP调用,类似于.NET通常的做法。

JAX-WS is probably the recommended way to go unless you have specific needs that make data binding unfeasible. 除非您有特定需求使数据绑定不可行,否则JAX-WS可能是推荐的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM