WebService常见异常(一)

简介: WebService常见异常(一)

WebService常见异常(一)

Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:375)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
    at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:134)
    at javax.xml.ws.Endpoint.publish(Endpoint.java:240)
    at top.simba1949.server.ServerApp.main(ServerApp.java:9)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:197)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:460)
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:338)
    ... 4 more
Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
    at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:276)
    at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:135)
    at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:84)
    at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:63)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:182)
    ... 7 more
————————————————

解决方案:缺少cxf-rt-transports-http-jetty的jar

<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-transports-http-jetty -->
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http-jetty</artifactId>
    <version>3.2.4</version>
</dependency>
目录
相关文章
在使用SSH+Spring开发webservice ,报的一些异常及处理方法
在使用SSH+Spring开发webservice ,报的一些异常及处理方法
201 0
在使用SSH+Spring开发webservice ,报的一些异常及处理方法
|
.NET 开发框架
添加引用方式抛出和捕获干净的WebService异常
转载:http://www.cnblogs.com/ahdung/p/3953431.html 说明:【干净】指的是客户端在捕获WebService(下称WS)抛出的异常时,得到的ex.Message就是WS方法中抛出的异常消息,不含任何“杂质”。
924 0
|
.NET 开发框架
WebService如何抛出干净的异常
转载:http://www.cnblogs.com/ahdung/p/3953431.html 说明:【干净】指的是客户端在捕获WebService(下称WS)抛出的异常时,得到的ex.Message就是WS方法中抛出的异常消息,不含任何“杂质”。
905 0
|
.NET 网络架构 开发框架
在ASP.NET中使用SOAP Extensions捕获WebService异常
原文:在ASP.NET中使用SOAP Extensions捕获WebService异常 Application_Error不能捕获的异常 [WebMethod] public string HelloWorld() { th...
1082 0
|
数据格式 XML
封装SoapException处理Webservice异常
Webservice客户端使用一个WebMethod时,如果WebMethod内部出现异常,不管异常是系统级异常或者自定义的异常,均会被包装为SoapException类型的异常,返回给客户端。
672 0
|
4月前
|
XML Java 应用服务中间件
WebService - Axis2基于JAX-WS开发WebService并发布多个WebService
WebService - Axis2基于JAX-WS开发WebService并发布多个WebService
36 0
|
4月前
|
Java 应用服务中间件 Spring
WebService - Axis2使用services.xml进行开发server与client(未与Spring整合)
WebService - Axis2使用services.xml进行开发server与client(未与Spring整合)
44 0
|
4月前
|
Java 应用服务中间件 Spring
WebService - CXF开发Server和Client(main方法测试)
WebService - CXF开发Server和Client(main方法测试)
40 0