简体   繁体   English

WildFly9.0-添加Web服务访问

[英]WildFly9.0 - adding web service access

I am migrating my RESTful web application from GlassFish4.1 to WildFly9.0 for the first time. 我第一次将RESTful Web应用程序从GlassFish4.1迁移到WildFly9.0。

Initially, I suffered deployment issues due Jersey dependencies. 最初,由于Jersey依赖性,我遇到了部署问题。 To overcome that problem, I simply replaced said project dependencies with RESTEasy equivalents inside of the pom.xml file. 为了解决该问题,我只是用pom.xml文件内部的RESTEasy等效项替换了上述项目依赖项。 In doing so, my application became deployable -- and according to (WildFly_base)/standalone/log , and the applications themselves -- are working as expected. 这样,我的应用程序就可以部署了-并且根据(WildFly_base)/standalone/log和应用程序本身-可以按预期工作。

Additionally, I added a jboss-web.xml configuration file to my WEB-INF folder: 另外,我在我的WEB-INF文件夹中添加了一个jboss-web.xml配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "http://www.jboss.org/j2ee/dtd" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
    <context-root>myprojectstart</context-root>
</jboss-web>

The hello-world page can be reached @ http://ipaddress:8080/myprojectstart . 可以通过@ http:// ipaddress:8080 / myprojectstart来访问hello-world页面。

... however, I cannot view my web services @ http://ipaddress:8080/myprojectstart/getData , just like I could when using GlassFish-4.1. ...但是,我无法查看我的Web服务@ http:// ipaddress:8080 / myprojectstart / getData ,就像使用GlassFish-4.1时一样。

So; 所以; what am I missing? 我想念什么?

Note: I use @annotations like: 注意:我使用@annotations像:

  • @ApplicationPath("/*") @ApplicationPath(“ / *”)
  • @Path("/getData") @Path(“ / getData”)

No seperate .xml business here 这里没有单独的.xml业务

I don't think RestEasy supports * in ApplicationPath. 我不认为RestEasy在ApplicationPath中支持*。 If you remove that it should work fine. 如果删除,它应该可以正常工作。

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

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