Cannot find any registered HttpDestinationFactory from the Bus.

来源:互联网 发布:朱生豪 莎士比亚 知乎 编辑:程序博客网 时间:2024/06/16 03:36
14:21:34.608 INFO  [main][] o.a.c.s.f.ReflectionServiceFactoryBean - Creating Service {http://ws.ecs.com/}userWs from class com.ecs.ws.UserWs14:21:34.986 ERROR [main][] o.a.c.t.http.HTTPTransportFactory - Cannot find any registered HttpDestinationFactory from the Bus.javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:369)    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)    at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)    at javax.xml.ws.Endpoint.publish(Endpoint.java:170)    at com.ecs.ws.PublishTest.main(PublishTest.java:11)Caused by: org.apache.cxf.service.factory.ServiceConstructionException    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:178)    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)    at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:454)    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)    ... 4 moreCaused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.    at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:295)    at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142)    at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:93)    at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:72)    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)    ... 7 more

在使用websesrvice的时候, 发布服务出现了错误, 因为缺失了cxf-rt-transports-http-jetty依赖包, 加入以下依赖即可

<dependency>    <groupId>org.apache.cxf</groupId>    <artifactId>cxf-rt-transports-http-jetty</artifactId>    <version>${cxf-version}</version></dependency>
0 0
原创粉丝点击