本文介绍了带有jboss 4.2.2的javax.jws.WebService.wsdlLocation的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何特别使用JBoss 4.2.2中的javax.jws.WebService.wsdlLocation? (这是针对作为Web服务部署的EJB3 bean的.)

How specifically can you use the javax.jws.WebService.wsdlLocation in JBoss 4.2.2? (This is for an EJB3 bean deployed as a web service).

有一些支持它的文档,但是格式到底是什么?我尝试过http,也尝试过相对网址. JBoss如何查找它,URL,EJB的类路径中的其他内容?

There is some documentation around that it is supported, but what exactly is the format? I have tried an http, I have tried a relative URL. How does JBoss look for it, a URL, something on the classpath of the EJB, something else?

推荐答案

您应该看看 JBWS-2206 和相关问题 JBWS-1714 JBWS-1837 .

You should take a look at JBWS-2206 and related issues JBWS-1714 and JBWS-1837.

根据我收集到的信息,JBoss在内部将Metro(RI)用于JAX-WS.我对此不太确定,但是,如果通过wsdllocation属性提供,则Metro使用类加载器读取WSDL,这似乎使EJB JAR的META-INF/wsdl成为放置WSDL的安全选择. JBWS-2206中的示例文件将有助于作为参考

From the information I could gather, JBoss internally uses Metro (the RI) for JAX-WS. I'm not very sure about this, but it appears that Metro reads WSDLs, if provided via the wsdllocation attribute, using the classloader, thereby making META-INF/wsdl of the EJB JAR a safe choice to place WSDLs. The example file in JBWS-2206 would help as a reference.

更新

关于如何提供您自己的WSDL存​​在于JBoss论坛中..

更新#2

JAX-WS规范为为什么会出现这种情况提供了一个更好的主意.在 5.2.5.3 @WebService(wsdlLocation)和元数据的使用部分中,可以找到说明该说明的规范

The JAX-WS specification, gives a better idea on why this is the case. In the section 5.2.5.3 Use of @WebService(wsdlLocation) and Metadata, one can find the specification stating that

此外,它指出

定义生成的WSDL的外观.

defining how the generated WSDL should appear.

这篇关于带有jboss 4.2.2的javax.jws.WebService.wsdlLocation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:49
查看更多