简体   繁体   English

JBoss 中带注释的 WS

[英]Annotated WS in JBoss

I am trying to see the compatibly of different jee6 servers.我正在尝试查看不同 jee6 服务器的兼容性。

With this occasion I did a very basic WS app在这个场合,我做了一个非常基本的 WS 应用程序

http://uploading.com/files/786a932f/HelloWorldWs.war/ 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它在 Glassfish 3.1 上效果很好

http://localhost:8080/HelloWorldWs/HelloWorldWs?wsdl http://localhost:8080/HelloWorldWs/HelloWorldWs?wsdl

return the wsdl返回 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.但是当我尝试最新的 JBoss 7 CR 时,尽管部署了战争并且http://localhost:8080/HelloWorldWs有效,但该链接不再起作用。

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?我的问题是:我所做的事情有问题吗,或者 JBoss 还没有准备好使用这种轻量级的 WS,只使用注释?

Thank you !谢谢 !

I had a similar issue ( JBWS-3276 ) in JBoss AS 6 (discussion here ).我在 JBoss AS 6 中遇到了类似的问题( JBWS-3276 )(在此处讨论)。

You may have to add an entry to your web.xml as described in the JBoss 6 documentation .JBoss 6 文档中所述,您可能必须向 web.xml 中添加一个条目。

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.如果您发现新问题,我建议您报告它们- 尽管请参阅规范而不是 Glassfish 实现,以获得有关预期行为的最终决定。 The web services API is maintained at jboss.org/jbossws so it would be best to track these releases for JAX-WS support. web 服务 API 在jboss.org/jbossws维护,因此最好跟踪这些版本以获得 JAX-WS 支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM