2014-01-08 19 views
0

我有一个本地部署好的应用程序,但是当我把它放在一个共享的jboss上时会抛出org.jboss.ws.WSException: {http://shared.url/uniquePart/}XmlBean is not a valid property on class我该如何解决“org.jboss.ws.WSException:不是一个有效的属性类”没有javax.xml.ws.RequestWrapper?

(我想声明的命名空间无处不在,以减少冲突。)

一切说,使用@RequesWrapper避免这个问题,但我有一个以上的参数作为输入,我不知道如何使用@RequesWrapper具有一个以上的className

@Clustered 
@Stateless(name = "Publisher", description = "...") 
@WebService(name = "Publisher", serviceName = "Publisher", targetNamespace="http://shared.url/uniquePart/") 
@WebContext(contextRoot="CantChangeThis") 
@RemoteBinding(jndiBinding="Publisher/remote") 
public class PublisherBean implements PublisherRemote 
{ 

    @WebMethod 
    @WebResult(name = "Published") 
    @Override 
    public boolean sendPublish(
     @WebParam(name = "XmlBean", targetNamespace="http://shared.url/uniquePart/") XmlBean1 xml1, 
     @WebParam(name = "someString") String stringName, 
     @WebParam(name = "XmlBean2") XmlBean2 xml2) { 
      .... 
    }} 

这种精细部署本地,但在共享环境炸毁,说的XMLBean是不是类mypackage.jaxws.SendPublish

据我可以告诉一个有效的属性,我可以把XmlBean,字符串和XmlBean2到另一个类my.MyOtherClass中,并使用@RequesWrapper(className='my.MyOtherClass')来解决这个问题,但这是一个普遍的问题,虽然整个部署,我希望有一个更好的方式做到这一点,我不必摆脱所有采用多个简单参数的方法。

回答

0

org.jboss.ws.WSException: {http://shared.url/uniquePart/}XmlBean is not a valid property on class错误最终成为类加载冲突,与代码和问题完全无关。

这是通过添加“jboss-classloading.xml”文件并将父母优先设置为'true'来解决的

相关问题