setProperty必须被SOAPMessage的所有子类覆盖 [英] setProperty must be overridden by all subclasses of SOAPMessage

查看:92
本文介绍了setProperty必须被SOAPMessage的所有子类覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在JBoss 5.1.0的WAR应用程序中部署一些Web服务.

I'm trying to deploy some web services in a WAR application on JBoss 5.1.0.

我已经使用JAX-WS工具wsgen从现有的wsdl中创建了源文件.这样就创建了Service文件和带有@XmlType注释的小节,用作请求和响应包装器.

I have created the source files from an existing wsdl using JAX-WS tool wsgen. This created the Service files and @XmlType annotated clases that would act as request and response wrappers.

这些类在JBoss 4.2.3上运行良好,但是当移至JBoss 5.1.0时,出现此异常.

This classes worked well on JBoss 4.2.3, but when moving to JBoss 5.1.0, I get this exception.

java.lang.UnsupportedOperationException:setProperty必须被SOAPMessage的所有子类覆盖

java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage

我的配置:

  • Windows XP SP3(但在Vista和Linux上都一样)
  • Sun JDK 1.6.0_17
  • 用于jdk6的JBoss 5.1.0 GA

提前谢谢!

推荐答案

有些问题可能会出错,因此我将告诉您在我的情况下有什么帮助(类似于您的情况,我使用的是JDK 1.6.0_13)

There are a few thing that might go wrong, so I will tell you what helped in my case (analogous to yours, I was using JDK 1.6.0_13).

问题出在JAR不匹配.首先,请确保JBoss使用的是JDK 1.6,请检查您的JAVA_HOME env.多变的.其次,确保您的类是使用JDK 1.6编译的.如果从Eclipse运行项目,请确保Eclipse使用的是正确的JDK,与从Eclipse运行JBoss一样.

The problem lies in JARs mismatch. First of all make sure JBoss is using JDK 1.6 check your JAVA_HOME env. variable. Secondly make sure your classes are compiled using JDK 1.6. If you run your project from Eclipse make sure Eclipse is using right JDK, the same if you run JBoss from Eclipse.

我想你做对了,所以有了一些魔术.运行客户端不要使用$ JBOSS_HOME/client中的库,而仅使用$ JBOSS_HOME/lib/endorsed中提供的库.显然,如果您正在使用任何其他与JAX-WS不相关的API,例如JPA或EJB或Servlet,则可以将它们添加到类路径中,但只能使用 lib/endorsed JAX-WS JAR.

I guess your have it right, so there comes some magic. Running client do not use libraries from $JBOSS_HOME/client, but use only the ones provided in $JBOSS_HOME/lib/endorsed. Obviously if you are using any other JAX-WS-unrelated API like JPA or EJB or Servlets you can add them to the classpath, but use only lib/endorsed JAX-WS JARs.

在JBoss 5.1的情况下,它对我的​​特定情况有所帮助,在早期版本的JBoss中,其他一些技巧也起作用,例如,尝试添加java选项 启动客户端和JBoss时,-Dsun.lang.ClassLoader.allowArraySyntax = true或/和-Djava.endorsed.dirs = $ JBOSS_HOME/lib/endorsed.

It helped in my particular situation in case of JBoss 5.1, in earlier versions of JBoss a few other tricks worked, for instance try to add java option -Dsun.lang.ClassLoader.allowArraySyntax=true or/and -Djava.endorsed.dirs=$JBOSS_HOME/lib/endorsed when starting your client and JBoss.

这篇关于setProperty必须被SOAPMessage的所有子类覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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