带有jboss 4.2.2的javax.jws.WebService.wsdlLocation [英] javax.jws.WebService.wsdlLocation with jboss 4.2.2

查看:155
本文介绍了带有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-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

端点实现类上的wsdlLocation注释元素的值(如果有),必须 是相对网址.它指向的文档必须与应用程序打包在一起.而且,它必须 请遵循以下5.2.5.4节(应用程序指定的服务")中的要求.
The value of the wsdlLocation annotation element on an endpoint implementation class, if any, MUST be a relative URL. The document it points to MUST be packaged with the application. Moreover, it MUST follow the requirements in section 5.2.5.4 below ("Application-specified Service").

此外,它指出

JAX-WS实现必须修补所有wsdl:import和xsd:import的位置属性 指向本地文档的本地文档中的声明.一个实现绝不能打补丁 其他位置属性.
A JAX-WS implementation MUST patch the location attributes of all wsdl:import and xsd:import statement in local documents that point to local documents. An implementation MUST NOT patch any other location attributes.

定义生成的WSDL的外观.

defining how the generated WSDL should appear.

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

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