JBoss 中带注释的 WS
我正在尝试查看不同 jee6 服务器的兼容性。
这次我做了一个非常基本的 WS 应用程序
http://uploading.com/files/786a932f/ HelloWorldWs.war/
这是最简单的一个 :)
@WebService(serviceName = "HelloWorldWs")
public class HelloWorldWs {
/** This is a sample web service operation */
@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String txt) {
return "Hello " + txt + " !";
}
}
它在 Glassfish 3.1 上运行得非常好
http://localhost:8080/HelloWorldWs/HelloWorldWs?wsdl
返回 wsdl
但是当我尝试最新的 JBoss 时7 CR 尽管部署了战争并且 http://localhost:8080/HelloWorldWs 有效。
我的问题是:我所做的事情是否有问题,或者 JBoss 尚未准备好仅使用注释以这种简单的形式使用 WS?
谢谢 !
I am trying to see the compatibly of different jee6 servers.
With this occasion I did a very basic WS app
http://uploading.com/files/786a932f/HelloWorldWs.war/
It is the most simple one :)
@WebService(serviceName = "HelloWorldWs")
public class HelloWorldWs {
/** This is a sample web service operation */
@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String txt) {
return "Hello " + txt + " !";
}
}
It works very nice on Glassfish 3.1
http://localhost:8080/HelloWorldWs/HelloWorldWs?wsdl
return the wsdl
but when i try on latest JBoss 7 CR that link is not working anymore despite the war is deployed and http://localhost:8080/HelloWorldWs works.
My qustion is: is something wrong in what i do or JBoss is not yet ready for WS yet in this light form by using only annotations ?
Thank you !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 JBoss AS 6 中遇到了类似的问题(JBWS-3276)(讨论 此处)。
您可能需要按照 JBoss 6 文档。
如果您发现新问题,我建议您报告它们 - 尽管请参阅规范,而不是 Glassfish 实现对预期行为做出最终决定。 Web 服务 API 维护于 jboss.org/jbossws,因此最好跟踪 JAX 的这些版本-WS支持。
I had a similar issue (JBWS-3276) in JBoss AS 6 (discussion here).
You may have to add an entry to your web.xml as described in the JBoss 6 documentation.
If you find new issues I recommend you report them - though refer to the specs and not the Glassfish implementation for the final word on expected behaviour. The web services API is maintained at jboss.org/jbossws so it would be best to track these releases for JAX-WS support.