在Java中使用WCF WsHttpBinding WebService [英] Consuming a WCF WsHttpBinding WebService in Java

查看:225
本文介绍了在Java中使用WCF WsHttpBinding WebService的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让Java客户端与WCF wshttpbinding WebService进行通信。但我无法这样做。电话会挂起,或者我得到musunderstoodheader expcetions。

I'm trying to get a Java Client to communicate with a WCF wshttpbinding WebService. But I am unable to do so. The call either hangs, or I get "musunderstoodheader expcetions".

我的Web服务只是默认的Visual Studio生成的WCF服务库模板。

My Web Service is just the default Visual Studio generated "WCF Service Library Template".

我的Web服务客户端只是一个空白的IntelliJ项目,使用添加Web服务客户端生成相应的存根(指定的Web服务平台是JAX-WS 2.X)。

My Web Service Client is just a blank IntelliJ project, with the corresponding stub generated using "Add Web Service Client" (the webservice platform specified is JAX-WS 2.X).

当我将绑定更改为BasicHttpBinding时,一切都完美无瑕。

When I change my binding to BasicHttpBinding everything works flawlessly.

我尝试过使用WsHttpBinding配置,包括关闭安全性,但我没有成功。

I've tried playing with the WsHttpBinding configuration, including turning off security, but I've had no success.

建议?想法? WAXHttpBinding仅部分支持JAX-WS 2.0吗?

Suggestions ? Thoughts ? Is the WsHttpBinding only partially supported by JAX-WS 2.0?

推荐答案

你的问题是 JAX-WS 不支持wsHttpBinding中使用的相同WS协议。您需要使用 WSIT 。 WSIT可作为 Metro 库的一部分提供,该库也可在 Glassfish

Your problem is that JAX-WS doesn't support the same WS protocols that are used in the wsHttpBinding. You need to use WSIT instead. WSIT is available as part of the Metro library, which is also available on Glassfish.

我建议尽可能使用wsHttpBinding或ws2007HttpBinding,但你仍然可以通过SSL / Transport Auth进行basicHttpBinding的相当安全的服务。

I recommend using wsHttpBinding or ws2007HttpBinding where possible, but you can still do a fairly secure service with basicHttpBinding over SSL/Transport Auth.

这篇关于在Java中使用WCF WsHttpBinding WebService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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