(1)使用web容器模式在jboss中部署web service 一般会报没法找到相应的类的错误,(这里若是没有web.xml的话就没法部署也不会出现下面错误)java
Not installing optional component org.jboss.as.quickstarts.wshelloworld.OrderServiceImpl due to exception: java.lang.ClassNotFoundException: org.jboss.as.quickstarts.wshelloworld.OrderServiceImpl from [Module "deployment.WebServiceTest.war:main" from Service Module Loader]web
将webservice的类打成jar包,放入WebContent/WEB-INF/lib,这时重启服务器,会看到以下服务,仍然会报错,而后再次删除这个jar包,重启服务器,问题解决(问题缘由应该是服务器找不到该类)shell
Web.xml能够没有,但若是有必须保证其正确服务器
(2)使用ejb容器模式在jboss中部署web service 须要把ejb打成jar 包而后添加到build path libraries里面ui