cxf发布webService报错Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/

我在本地调试运行都是正常的,但是当我把程序放在linux服务器运行时就会报错,
我是使用jersey框架和glassfish服务器,没有使用到spring框架,错误信息如下:
com.heren.his.commons.filters.SecurityFilter -** javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/**
javax.servlet.ServletException: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:421) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:222) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.his.commons.filters.UTF8Encoding.doFilter(UTF8Encoding.java:22) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.his.commons.filters.SecurityFilter.filterChainDoFilter(SecurityFilter.java:92) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.his.commons.filters.SecurityFilter.doFilter(SecurityFilter.java:86) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.his.commons.filters.RouterFilter.doFilter(RouterFilter.java:52) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.his.commons.filters.HerenWebStatFilter.doFilter(HerenWebStatFilter.java:77) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.his.commons.filters.ForwardFilter.doFilter(ForwardFilter.java:85) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.heren.i0.jpa.PersistFilter.doFilter(PersistFilter.java:98) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:137) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:106) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:226) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:173) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at javax.xml.ws.Endpoint.publish(Endpoint.java:240) ~[na:1.8.0_60]
at com.heren.his.diseasereport.api.InfectionWebResource.pointService(InfectionWebResource.java:41) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:164) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:181) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:203) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:305) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:288) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1110) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:401) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
... 28 common frames omitted
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:352) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:182) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:259) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
... 53 common frames omitted
Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered.
at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:123) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:339) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na]
... 60 common frames omitted

恳求大佬们帮帮忙

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

springBoot集成cxf发布WebService,发布报错

最近项目在集成webservice,但是发布后无法查看WSDL。 目前已经到这一步了 ![图片说明](https://img-ask.csdn.net/upload/201812/13/1544690431_402679.jpg) 点击WSDL后,后台就报这个错 ![图片说明](https://img-ask.csdn.net/upload/201812/13/1544690380_474119.jpg) 求大神帮我看一下是什么原因导致的 以下是项目代码 接口 ``` @WebService(name = "YgrhService",targetNamespace = "http://service.hospital.webservice.modules.x.xinjian.com") public interface YgrhService { @WebMethod @WebResult(name = "String",targetNamespace = "") String uploadPatientInfo(@WebParam(name = "info") String info); @WebMethod User getUser(String userId); } ``` 实现类 ``` @Component @WebService(serviceName = "YgrhService",argetNamespace = "http://service.hospital.webservice.modules.x.xinjian.com",endpointInterface = "com.xinjian.x.modules.webservice.hospital.service.YgrhService") public class YgrhServiceImpl implements YgrhService { private Map<String, User> userMap = new HashMap<String, User>(); public YgrhServiceImpl() { System.out.println("向实体类插入数据"); User user = new User(); user.setUserId("411001"); user.setUsername("zhansan"); user.setAge("20"); user.setUpdateTime(new Date()); userMap.put(user.getUserId(), user); user = new User(); user.setUserId("411002"); user.setUsername("lisi"); user.setAge("30"); user.setUpdateTime(new Date()); userMap.put(user.getUserId(), user); user = new User(); user.setUserId("411003"); user.setUsername("wangwu"); user.setAge("40"); user.setUpdateTime(new Date()); userMap.put(user.getUserId(), user); } @Override public String uploadPatientInfo(String info) { return "liyd"+ info; } @Override public User getUser(String userId) { User user= userMap.get(userId); return user; } } ``` 配置文件 ``` @Configuration public class TestConfig { @Autowired private YgrhService ygrhService; @Bean public ServletRegistrationBean disServlet() { ServletRegistrationBean bean = new ServletRegistrationBean(new CXFServlet(), "/services/*"); return bean; } @Bean(name = Bus.DEFAULT_BUS_ID) public SpringBus springBus() { return new SpringBus(); } @Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), ygrhService); endpoint.publish("/YgrhService"); return endpoint; } } ``` domo ``` public class User { private static final long serialVersionUID = -5939599230753662529L; private String userId; private String username; private String age; private Date updateTime; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } } ```

weblogic10.3.6集群 发布cxf2.7.1 webservice报错

测试环境发布两个节点都好好的,但到了正式环境就会有一个节点起不来,折腾一天了,jar包冲突的很多方法都试过了,还没解决

cxf整合webservice报错

//接口 @WebService public interface CxfWSserverDemo { public String getMsg(@WebParam(name="xmlStr") String xmlStr); } //实现 @WebService @Component("cxfWSserverDemo") public class CxfWSserverDemoImpl implements CxfWSserverDemo { @Override public String getMsg(String xmlStr) { System.out.println("getMsg..."); return "cxf服务说 : " + xmlStr; } } 异常如下:SEVERE: Servlet.service() for servlet [CXFServlet] in context with path [/cxfWSdemo] threw exception java.lang.IllegalStateException: getWriter() has already been called for this response at org.apache.catalina.connector.Response.getOutputStream(Response.java:644) at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:196) at org.apache.cxf.transport.servlet.servicelist.ServiceListGeneratorServlet.renderStyleSheet(ServiceListGeneratorServlet.java:174) at org.apache.cxf.transport.servlet.servicelist.ServiceListGeneratorServlet.service(ServiceListGeneratorServlet.java:89) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:164) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:722

CXF调用.net发布的webservice服务报错

CXF调用.net发布的webservice服务报错:服务器未能识别 HTTP 头 SOAPAction 的值: 。 怎么向 CXF里面加入SOAPAction的值呢?

CXF WebService发布报错,各位大神请看下

只要在maven项目上加了下面这段代码发布webservice 就报错(我自己写的demo是正常的): <bean id="schoolNewsBean" class="com.edulife.ws.impl.SchoolNewsImpl"> </bean> <!-- 要发布成webservice的bean --> <jaxws:endpoint implementor="#schoolNewsBean" address="/CXFService"> </jaxws:endpoint> 错误信息: 2015-01-07 20:42:43,981 ERROR (org.springframework.web.context.ContextLoader:319) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.jaxws.EndpointImpl---938321254': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) ... 21 more Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:341) at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:490) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:704) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:550) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) ... 30 more Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Class has two properties of the same name "tSort" this problem is related to the following location: at public int com.edulife.model.merit.Dept.gettSort() at com.edulife.model.merit.Dept at public com.edulife.model.merit.Dept com.edulife.model.security.User.getDept() at com.edulife.model.security.User at private com.edulife.model.security.User com.edulife.ws.service.jaxws_asm.QuerySchoolNews.arg4 at com.edulife.ws.service.jaxws_asm.QuerySchoolNews this problem is related to the following location: at public int com.edulife.model.merit.Dept.tSort at com.edulife.model.merit.Dept at public com.edulife.model.merit.Dept com.edulife.model.security.User.getDept() at com.edulife.model.security.User at private com.edulife.model.security.User com.edulife.ws.service.jaxws_asm.QuerySchoolNews.arg4 at com.edulife.ws.service.jaxws_asm.QuerySchoolNews at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:356) at org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:244) at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:484) at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:339) ... 41 more

CXF发布webservice服务,浏览器里报错404--not found

![图片说明](https://img-ask.csdn.net/upload/201605/08/1462685387_691009.png)

cxf webservice客户端调用报错.高手请进.

<!-- WebServices设置 --> <servlet> <servlet-name>CXFServices</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServices</servlet-name> <url-pattern>rvices/*</url-pattern> </servlet-mapping> 客户端调用异常信息 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet CXFServices threw exception java.lang.ClassNotFoundException: javax.mail.MessagingException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:110) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) 接口如下 @WebService public interface CmisWeb { public FamilyMemberResult findFamilyMembers(WsUser wSUser, FamilyMemberSearchDTO search); }

vb6调用java spring集成cxf发布的webservice报错

使用java调用webservice接口 正常 使用webservice Stuio调用正常 但是使用vb6调用就 Client:Incorrect number of parameters supplied for SOAP request HRESULT=0x80070057: 参数错误。 - Client:Unspecified client error. HRESULT=0x80070057: 参数错误。 没有代码 , 想知道是vb6 这边的问题还是java这边的问题

springboot整合cxf发布成功发布webservice后导致无法加载静态资源

springboot整合cxf发布成功发布webservice后导致无法加载静态资

cxf实现webservice时候数组和list的问题

我在用cxf实现webservice时候,接口中的一个参数是数组,返回的是pojo类,pojo类里面也有一个数组,然后我发布了这个接口,再用利用wsdl和wsdl2java去生成客户端的类,我发现原来使用数组的地方,生成的客户端类里面都变成了arraylist类型的。我发现我现在生成的wsdl里面参数不管是数组还是list,都是<xs:element maxOccurs="unbounded" minOccurs="0" name="filesNameArray" nillable="true" type="xs:string"/>这样的,没法区分是数组还是List.我想问下,用cxf实现webservice时候要怎么才能让生成的wsdl里面描述参数类型的时候能区分是数组还是list。

发布webservice报错,org.eclipse.jetty.io.Buffers$Type找不到

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/io/Buffers$Type at org.eclipse.jetty.http.HttpBuffers.<init>(HttpBuffers.java:33) at org.eclipse.jetty.server.AbstractConnector.<init>(AbstractConnector.java:102) at org.eclipse.jetty.server.nio.AbstractNIOConnector.<init>(AbstractNIOConnector.java:27) at org.eclipse.jetty.server.nio.SelectChannelConnector.<init>(SelectChannelConnector.java:85) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine$1.createConnector(JettyHTTPServerEngine.java:667) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:334) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:179) at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49) at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:95) at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:896) at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:122) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:362) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155) at javax.xml.ws.Endpoint.publish(Unknown Source) at test.webservice.MyWebServicePublish.main(MyWebServicePublish.java:9) Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.io.Buffers$Type at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 16 more org.eclipse.jetty.io.Buffers$Type在哪个jar包中?找不到啊。。。

webservice 配置cxf总是报错

ERROR 2015-10-21 11:16:39,846 [main] org.springframework.web.servlet.DispatcherServlet: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wobroadbandser': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address /WoBroadbandSerSOAP at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:190) at org.apache.cxf.transport.servlet.CXFServlet.updateContext(CXFServlet.java:158) at org.apache.cxf.transport.servlet.CXFServlet.onApplicationEvent(CXFServlet.java:206) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:336) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4425) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4738) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:676) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:602) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:503) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:759) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

java cxf webservice 传输文件异常

利用cxf传输大文件会报如下异常,请高手帮忙: [org.apache.cxf.phase.PhaseInterceptorChain]Interceptor for {http://impl.ws.zr.com/}zfFileService#{http://service.ws.zr.com/}getWsUser has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not write attachments. at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(AttachmentOutInterceptor.java:98) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Caused by: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:369) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:363) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46) at javax.activation.DataHandler.writeTo(DataHandler.java:294) at org.apache.cxf.attachment.AttachmentSerializer.writeAttachments(AttachmentSerializer.java:234) at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(AttachmentOutInterceptor.java:96) ... 31 more Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:756) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:363) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:780) at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:593) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:364) ... 40 more

cxf发布的webservice接口只能本地调用吗

cxf发布webservice接口供其他人调用,本地启动Tomcat访问时地址后面拼接?wsdl后能正常访问,显示wsdl文档。把项目打成war包部署到服务器的Tomcat上地址中localhost换成服务器ip地址就报404。cxf发布的webservice只能本地访问? 你们的web-INF文件夹下有wsdl文件么?我这没有,正常么?初次用cxf。。

cxf webservice客户端访问报错!

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157) at com.sun.proxy.$Proxy38.goLogin(Unknown Source) at cn.com.test.WSTest.main(WSTest.java:21) Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677) at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2139) at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2045) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134) at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1157) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:152) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1612) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1503) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1310) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) ... 2 more ![图片说明](https://img-ask.csdn.net/upload/201604/27/1461742860_448108.png)

cxf搭建webservice,传递javabean参数提示类转换错误

我用cxf(版本3.1.5)搭建了一个webservice,AsEntitymgttemplate是自定义的一个javabean对象,webservice方法传了一个这个参数。 package com.XXXX.XX.base.webservice @WebService public interface AmSynDataService { @WebMethod public AsEntitymgttemplate testAsEntitymgttemplate2(@WebParam(name = "temp") AsEntitymgttemplate temp); } package com.XXXX.XX.base.webservice @WebService public class AmSynDataServiceImp implements AmSynDataService{ @WebMethod public AsEntitymgttemplate testAsEntitymgttemplate2(@WebParam(name = "temp") AsEntitymgttemplate temp){ return new AsEntitymgttemplate(); } } 模拟客户端调用 JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient("http://localhost:8089/test/services/AmSynDataService?wsdl"); client.invoke("testAsEntitymgttemplate2", new AsEntitymgttemplate() ); 这个自定义的类大概如下: package com.XXXX.XX.model.entity; @Data @XmlRootElement(namespace="http://com.XXXX.XX.model.entity") @XmlAccessorType(XmlAccessType.FIELD) public class AsEntitymgttemplate extends AsBaseEntity { /** * */ private static final long serialVersionUID = -7027445566997840698L; private Long id; private String name; private String entityname; } 现在调用这个webservice接口,总是提示对象转换错误, Caused by: java.lang.ClassCastException: com.XXXX.XX.model.entity.AsEntitymgttemplate cannot be cast to com.XXXX.XX.base.webservice.AsEntitymgttemplate 我的AsEntitymgttemplate对象明明是在entity包下面,为什么cxf一定要我放到webservice接口包下面呢? 是不是我哪里还需要在接口里或在javabean里定义?比如包名啥的,知道的朋友能否告知下,哎!

如何将用cxf开发的Webservice发布到tomcat,要求不集成spring

如何将用cxf开发的Webservice发布到tomcat,要求不集成spring 求详解怎么配置web.xml等文件,谢谢了

跪求各位大神webservice报错问题

java.net.SocketTimeoutException: failed to connect to /192.168.0.181 (port 5039) after 3000ms 1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connectErrno(IoBridge.java:159) 1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connect(IoBridge.java:112) 1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) 1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459) 1970-01-02 08:00:15 W/System.err( 791): at java.net.Socket.connect(Socket.java:843) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:131) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.Connection.connect(Connection.java:101) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.ServiceConnectionSE.openOutputStream(ServiceConnectionSE.java:126) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:179) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:116) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:111) 1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getInfoBySoap(XiRuan.java:215) 1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getGuestInfo(XiRuan.java:65) 1970-01-02 08:00:15 W/System.err( 791): java.net.SocketTimeoutException: failed to connect to /192.168.0.181 (port 5039) after 3000ms 1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connectErrno(IoBridge.java:159) 1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connect(IoBridge.java:112) 1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) 1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459) 1970-01-02 08:00:15 W/System.err( 791): at java.net.Socket.connect(Socket.java:843) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:131) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.Connection.connect(Connection.java:101) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89) 1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.ServiceConnectionSE.openOutputStream(ServiceConnectionSE.java:126) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:179) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:116) 1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:111) 1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getInfoBySoap(XiRuan.java:215) 1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getGuestInfo(XiRuan.java:65) 1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.ollauncher.WelcomeActivity$GetGuestInfoFromXiruanThread.run(WelcomeActivity.java:1743) 1970-01-02 08:00:15 I/WelcomeActivity-----------TAG( 791): infomafff= 1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.ollauncher.WelcomeActivity$GetGuestInfoFromXiruanThread.run(WelcomeActivity.java:1743)

cxf动态调用webservice报错 Caused by: javax.xml.bind.UnmarshalException

``` 20:00:58.221 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.AttachmentInInterceptor@65b3a85a 20:00:58.221 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.interceptor.StaxInInterceptor@34997338 20:00:58.223 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Adding interceptor org.apache.cxf.interceptor.StaxInEndingInterceptor@201b6b6f to phase pre-invoke 20:00:58.223 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Chain org.apache.cxf.phase.PhaseInterceptorChain@7e928e2f was modified. Current flow: receive [PolicyInInterceptor, AttachmentInInterceptor] post-stream [StaxInInterceptor] read [ReadHeadersInterceptor, SoapActionInInterceptor, StartBodyInterceptor] pre-protocol [MustUnderstandInterceptor] post-protocol [CheckFaultInterceptor] unmarshal [RPCInInterceptor, SoapHeaderInterceptor] post-logical [WrapperClassInInterceptor] pre-invoke [StaxInEndingInterceptor, SwAInInterceptor, HolderInInterceptor, PolicyVerificationInInterceptor] 20:00:58.223 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor@2cae1042 20:00:58.230 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor@57eda880 20:00:58.231 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor@163d04ff 20:00:58.231 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@2262b621 20:00:58.231 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@7c209437 20:00:58.231 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.RPCInInterceptor@2b5825fa 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.RPCInInterceptor@2b5825fa 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@7c209437 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@2262b621 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor@163d04ff 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor@57eda880 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor@2cae1042 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.interceptor.StaxInInterceptor@34997338 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.interceptor.AttachmentInInterceptor@65b3a85a 20:00:58.256 [main] DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.cxf.ws.policy.PolicyInInterceptor@62f4ff3b 20:00:58.258 [main] WARN org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {urn:hmsas}hmsasService#{urn:hmsas}getdatatoarray has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Unmarshalling Error: unrecognized type name: {http://schemas.xmlsoap.org/soap/encoding/}Array at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:905) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:711) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:172) at org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(RPCInInterceptor.java:176) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:833) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1695) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1572) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1373) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:673) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:537) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:446) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:361) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:339) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:325) at com.web.demo.util.WebserviceUtil.get(WebserviceUtil.java:41) at com.web.demo.util.WebserviceUtil.main(WebserviceUtil.java:26) Caused by: javax.xml.bind.UnmarshalException: null at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:421) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337) at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:854) at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:102) at org.apache.cxf.jaxb.JAXBEncoderDecoder$2.run(JAXBEncoderDecoder.java:893) at java.security.AccessController.doPrivileged(Native Method) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:891) ... 20 common frames omitted Caused by: com.sun.istack.SAXParseException2: unrecognized type name: {http://schemas.xmlsoap.org/soap/encoding/}Array at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:609) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:239) at com.sun.xml.bind.v2.runtime.unmarshaller.XsiTypeLoader.parseXsiType(XsiTypeLoader.java:108) at com.sun.xml.bind.v2.runtime.unmarshaller.XsiTypeLoader.startElement(XsiTypeLoader.java:67) at com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:55) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:455) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:433) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:275) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:209) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358) ... 26 common frames omitted **Caused by: javax.xml.bind.UnmarshalException: unrecognized type name: {http://schemas.xmlsoap.org/soap/encoding/}Array** ... 37 common frames omitted ``` ``` ```

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c# 按行txt c#怎么扫条形码 c#打包html c# 实现刷新数据 c# 两个自定义控件重叠 c#浮点类型计算 c#.net 中文乱码 c# 时间排序 c# 必备书籍 c#异步网络通信
立即提问