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

查看:48
本文介绍了适用于 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 的额外 jar 才能在没有 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 紧密耦合.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 服务

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天全站免登陆