用于Java的轻量级SOAP客户端库 [英] Lightweight SOAP Client Library for Java

查看:485
本文介绍了用于Java的轻量级SOAP客户端库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以推荐一个优秀的Java开源库来构建一个简单的SOAP Web服务客户端吗?我正在寻找可在Java 5 SE环境中运行的具有最小依赖性和配置的东西。升级到Java 6并不是这个项目的真正选项,如果我可以避免使用它,我宁愿避免使用完整的J2EE容器。我不需要发布和服务,只需要消费。

Can anyone recommend a good Java open source library for building a simple SOAP web service client? I'm looking for something with minimal dependencies and configuration that will work in a Java 5 SE environment. Upgrading to Java 6 isn't really an option on this project and I'd prefer to avoid using a full J2EE container if I can avoid it. I don't need to publish and services, only consume.

我目前正在使用Axis2,但我必须提供大约15MB的额外罐子才能简化在没有NoClassDefFoundError的情况下调用Web服务,我正在寻找一些不那么臃肿的东西。

I'm currently using Axis2 but I have to pull in about 15MB of extra jars just to make a simple call to a web service without a NoClassDefFoundError and I'm looking for something with a lot less bloat.

我也看过CXF,但我不愿意使用它是因为它与Spring紧密耦合。春天不是100%的交易破坏者,但如果可能的话,我宁愿避免它。

I've also looked at CXF, but I'm reluctant to use it because of it's tight coupling to Spring. Spring isn't a 100% deal breaker, but I'd rather avoid it if possible.

有什么建议吗?

推荐答案

在Spring 3.0中,已经将大spring.jar拆分为模块,这将减小尺寸。

In Spring 3.0 thay have splitted the big spring.jar into modules which will reduce size.

检查 Spring Web Services

< a href =http://static.springsource.org/spring-ws/sites/1.5/reference/html/client.html\"rel =noreferrer> WS客户端示例

缺点是你必须管理很多jar之间的依赖关系,如果你不想引入maven,这可能会变得很复杂。这就是为什么我还在使用轴的原因(其中包括兼容性问题)。

The drawback would be that you have to manage dependencies between a lot of jar's this could be become complex if don't want to introduce maven. That was the reason (among others like compatibility problems) why I'm still using axis.

这篇关于用于Java的轻量级SOAP客户端库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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