如何在jax-ws客户端中隐藏警告(可能)由jax-ws库引起 [英] How to hide warning in jax-ws client which (maybe) caused by jax-ws library

查看:863
本文介绍了如何在jax-ws客户端中隐藏警告(可能)由jax-ws库引起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用netbeans在我的应用程序中生成Web服务客户端。我的程序使用jax-ws库来设置调用Web服务的超时。

I'm using netbeans to generate web service client in my application. And my program using jax-ws library to set timeout in calling web service.

出现问题是因为每当我开始这个程序时它会产生很多这个警告信息:

Problem arise because it generate a lot of this warning message whenever i start this program.:


2010年12月13日下午4:35:21
[com.sun.xml.ws.policy.EffectiveAlternativeSelector]
selectAlternatives警告:WSP0075:
政策断言
{ http://schemas.xmlsoap.org/ws/2004/10/wsat } ATAlwaysCapability
被评估为未知。

Dec 13, 2010 4:35:21 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] selectAlternatives WARNING: WSP0075: Policy assertion "{http://schemas.xmlsoap.org/ws/2004/10/wsat}ATAlwaysCapability" was evaluated as "UNKNOWN".

12月13日,
2010 4:35:21 PM
[com.sun.xml.ws.policy.EffectiveAlternativeSelector]
selectAlternatives警告:WSP0075:
政策断言
{ http:/ /schemas.xmlsoap.org/ws/2004/10/wsat } ATAssertion
被评估为UNKNOWN。

Dec 13, 2010 4:35:21 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] selectAlternatives WARNING: WSP0075: Policy assertion "{http://schemas.xmlsoap.org/ws/2004/10/wsat}ATAssertion" was evaluated as "UNKNOWN".

12月13日,
2010 4:35:21 PM
[com.sun.xml.ws.policy.EffectiveAlternativeSelector]
selectAlternatives警告:WSP0019:
次优政策备选在客户端选择
,健身
UNKNOWN。

Dec 13, 2010 4:35:21 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] selectAlternatives WARNING: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".

我在这里发现了同样的问题: http://forums.java.net/node/707265 ,但直到现在它也没有答案。

I found the same problem with mine in here: http://forums.java.net/node/707265 , but it also have no answer until now.

有没有办法隐藏此警告?我尝试使用谷歌搜索,并找不到任何匹配的问题答案..

Is there any way to hide this warning? I try to search using google, and can't find any match answer for this problem..

推荐答案

我的猜测是生成客户端的WSDL包含与WS-AtomicTransaction相关的策略断言。由于WS-AtomicTransaction需要事务管理器且JRE不包含事务管理器,因此JRE中的JAX-WS运行时不支持WS-AtomicTransaction并且不理解这些策略断言也就不足为奇了。

My guess is that the WSDL from which the client was generated contains policy assertions related to WS-AtomicTransaction. Since WS-AtomicTransaction requires a transaction manager and the JRE doesn't contain one, it's not surprising that the JAX-WS runtime in the JRE has no support for WS-AtomicTransaction and doesn't understand these policy assertions.

如果您不需要WS-AtomicTransaction,那么您有两个选项可以摆脱这些警告:

If you don't need WS-AtomicTransaction, then you have two options to get rid of these warnings:


  • 配置日志记录以禁止显示这些警告。

  • 从WSDL中删除断言。

如果您需要WS-AtomicTransaction,那么您可能必须在应用程序服务器或Java EE应用程序客户端中运行代码。

If you need WS-AtomicTransaction, then you will probably have to run the code in an application server or as a Java EE application client.

这篇关于如何在jax-ws客户端中隐藏警告(可能)由jax-ws库引起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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