Maven JBoss/CXF Restful Web服务给出错误';畸形异常:无协议:/';

Maven JBoss/CXF Restful Web服务给出错误';畸形异常:无协议:/';,maven,cxf,jboss6.x,cxfrs,Maven,Cxf,Jboss6.x,Cxfrs,我正在使用Spring编写一个CXF/Maven web服务,用于依赖项注入。以下是我的web服务代码:- @Path(“/myws”) 公共接口IMyWebService{ @职位 @路径(“/someAction”) @使用(“应用程序/json”) @生成(“应用程序/json”) MyResponse-requestSomeAction(MyRequest-requestObj); } @服务(“myWebService”) 公共类MyWebService实现IMyWebService{

我正在使用Spring编写一个CXF/Maven web服务,用于依赖项注入。以下是我的web服务代码:-

@Path(“/myws”)
公共接口IMyWebService{
@职位
@路径(“/someAction”)
@使用(“应用程序/json”)
@生成(“应用程序/json”)
MyResponse-requestSomeAction(MyRequest-requestObj);
}
@服务(“myWebService”)
公共类MyWebService实现IMyWebService{
@自动连线
私人IMyCoreService myCoreService;
公共MyResponse requestSomeAction(MyRequest requestObj){
//做些工作
返回myResponse;
}
}
在我的applicationContext.xml中


我已经用提供的范围标记了所有CXF依赖项,以便使用JBoss文件夹中的CXF库。我必须将以下JAR复制到JBoss的默认\lib文件夹,以满足所需的依赖项

cxf-rt-frontend-jaxrs.jar
aopalliance.jar
spring core jars
org.springframework.orm-3.0.0.RELEASE.jar
org.springframework.jdbc-3.0.0.RELEASE.jar
org.springframework.beans-3.0.0.RELEASE.jar
org.springframework.context-3.0.0.RELEASE.jar
com.springsource.org.hibernate.ejb-3.4.0.jar
我的应用服务器是JBoss。部署war并启动服务器时,出现以下错误:-

Caused by: java.net.MalformedURLException: no protocol: /
        at java.net.URL.<init>(URL.java:567) [:1.6.0_33]
        at java.net.URL.<init>(URL.java:464) [:1.6.0_33]
        at java.net.URL.<init>(URL.java:413) [:1.6.0_33]
        at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerDestination.<init>(HttpServerDestination.java:67) [:3.4.1.GA]
        at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerTransportFactory.createDestination(HttpServerTransportFactory.java:102) [:3.4.1.GA]
        at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerTransportFactory.getDestination(HttpServerTransportFactory.java:91) [:3.4.1.GA]
        at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:92) [:2.3.1]
        at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:71) [:2.3.1]
        at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:95) [:2.3.1]
原因:java.net.MalformedURLException:无协议:/
在java.net.URL.(URL.java:567)[:1.6.0_33]
在java.net.URL.(URL.java:464)[:1.6.0_33]
在java.net.URL.(URL.java:413)[:1.6.0_33]
位于org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerDestination.(HttpServerDestination.java:67)[:3.4.1.GA]
位于org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerTransportFactory.createDestination(HttpServerTransportFactory.java:102)[:3.4.1.GA]
位于org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerTransportFactory.getDestination(HttpServerTransportFactory.java:91)[:3.4.1.GA]
位于org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:92)[:2.3.1]
位于org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:71)[:2.3.1]
在org.apache.cxf.jaxrs.jaxrserverfactorybean.create(jaxrserverfactorybean.java:95)[:2.3.1]

我认为“/”是applicationContext.xml中给出的服务定义中给出的地址。为什么会出现上述错误,如何解决?非常感谢您的帮助。

可能重复:@guido根据您的评论,我想我已经克服了这个错误,但是发生的情况是,我的bean没有被注入到web服务中,即使被注入的类是尽可能空的,没有依赖项。这跟这有什么关系吗?