`

CXF WebService视频教程,自己录的(更新第7集 异步调用 2009.1.15)。

阅读更多
先录制了两集,SWF格式的。

以后会陆续添加,也希望大家给些意见和建议。

[2008.12.30]
由于工作比较忙,只有晚上回去才有时间录制视频,所以有些地方比较乱,还请大家谅解。我最初的想法是让每一集都不依赖于上一集,这样大家就可以从任何一集开始学习。

[2008.12.31]
接下来还会讲解JAXB,CXF中的Factory等。
分享到:
评论
165 楼 dingjixiao 2013-09-25  
楼主好人那!
164 楼 curly361907587 2013-07-15  
大神,,我写到Client 的时候 报错了。。 。。
Exception in thread "main" java.lang.ClassCastException: org.apache.cxf.endpoint.ServerImpl cannot be cast to test.HelloWorld
at test.HelloWorldClient.main(HelloWorldClient.java:17)
我真的不知道该怎么改了
163 楼 nwuhwb 2012-10-06  
我怎么下载不了啊。有谁下载过分享给我吧

QQ1194901972
162 楼 Kevin_jiang2011 2012-04-18  
太激动了。
161 楼 252131895 2012-04-04  
楼主啊,我得说你啊,都怪你出了这么好的视频,我看了半宿黑眼圈都出来了,支持你加油,顶啊
160 楼 wangjing2641 2012-03-29  
无法下载。。这是为什么呢
159 楼 liuzidong 2012-03-20  
向楼主致敬!
158 楼 org_zhanghua 2012-03-12  
讲解的不错、学习分享精神不错。希望继续更新、保存。
157 楼 solo- 2012-01-13  
不错 顶一个 正在学习
156 楼 zhushaolong 2011-10-13  
7中,异步回调,Future什么时候isDone啊?
155 楼 Kent_Mu 2011-08-29  
wsbjwjt 写道
21ca 写道
wsbjwjt 写道
在Client调用到这句:HelloWorld helloWorld = (HelloWorld) factory.create();

出现类转换异常:Exception in thread "main" java.lang.ClassCastException: org.apache.cxf.endpoint.ServerImpl
at com.wjt.test.HelloWorldClient.main(HelloWorldClient.java:22)

请帮助!谢谢


应该是你使用的Factory不正确.
ServerFactoryBean, JaxWsServerFactoryBean 用于服务器端.前者针对POJO,后者针对JAX-WS. 它们用于生成服务器端的Endpoint.

ClientProxyFactoryBean, JaxWsProxyFactoryBean 用于客户端,前者针对POJO,后者针对JAX-WS. 它们用于在客户端生成WebService的代理Proxy.

其实除了这些Factory, CXF客户端还有 ClientFactoryBean, JaxWsClientFactoryBean, 这两个Factory生成的不是WebService的代理, 而是一个Endpoint. 提供一些更高级的功能. 因为不太常用,而且麻烦容易混淆,所以视频里就没讲到.


谢谢讲解,我是按照视频第一集实现的,你的例子可以跑通,可是我的就不行,版本问题吗?
方便请把那个第一集的例子发给我,对比一下错在哪里?谢谢
我的邮箱: wsbjwjt@gmail.com


我的也是,一直报这样的错
154 楼 Kent_Mu 2011-08-29  
楼主你好,我按照你说的运行第一段程序HelloWorld,但报以下错,请帮我看看
Exception in thread "main" java.lang.ClassCastException: org.apache.cxf.endpoint.ServerImpl cannot be cast to com.webservice.cxf.service.IHelloWorld
at com.webservice.cxf.service.HelloWorldClient.main(HelloWorldClient.java:12)
153 楼 liu_moyan 2011-08-11  
liu_moyan 写道
第一HelloWorld报下面的错误:
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:186)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1830)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
at $Proxy11.sayHello(Unknown Source)
at test.HelloWorldClient.main(HelloWorldClient.java:15)
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:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87)
... 14 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:168)
at $Proxy11.sayHello(Unknown Source)
at test.HelloWorldClient.main(HelloWorldClient.java:15)
Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:186)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1830)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
... 2 more
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:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87)
... 14 more
向楼主求解

这个问题得到了答案:
加多这两句话就好了
HelloWorld hello = new HelloWorldImpl();
factoryBean.setServiceBean(hello);
152 楼 liu_moyan 2011-08-08  
第一HelloWorld报下面的错误:
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:186)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1830)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
at $Proxy11.sayHello(Unknown Source)
at test.HelloWorldClient.main(HelloWorldClient.java:15)
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:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87)
... 14 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:168)
at $Proxy11.sayHello(Unknown Source)
at test.HelloWorldClient.main(HelloWorldClient.java:15)
Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:186)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1830)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
... 2 more
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:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87)
... 14 more
向楼主求解
151 楼 xiangtui 2011-08-05  
感谢楼主,辛苦了!!
150 楼 KingZha 2011-08-01  
好东西 顶!
提个问题,按照第一个视频(1、使用CXF实现简单的HelloWorld.rar (8.3 MB)
)开发并发布的WebService,都通过,但是当使用Axis调用接口的时候却出现了问题,是否按第一个视频发布的WebService无法使用Axis调用,只能按视频里那样调用。求解释!
149 楼 a_alter 2011-07-25  
拿人手短 在此谢过
148 楼 tongyiwzh 2009-12-25  
谢谢你的学习资料。
不过,我按照你的教学视频,用CXF实现HelloWorld的demo时,启动MainServer时后台报错,然后启动HelloWorldClient也是一样,最后没有预期的打印效果,下面分别是服务端和客户端的打印代码,不知道你能不能帮我分析一下错误在哪里?
MainServer:
- Refreshing org.apache.cxf.bus.spring.BusApplicationContext@c21495: display name [org.apache.cxf.bus.spring.BusApplicationContext@c21495]; startup date [Fri Dec 25 16:16:50 CST 2009]; root of context hierarchy
2009-12-25 16:16:51 org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
信息: No cxf.xml configuration file detected, relying on defaults.
- Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]]
- Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]]
- Overriding bean definition for bean 'org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory': replacing [Generic bean: class [org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]]
- Bean factory for application context [org.apache.cxf.bus.spring.BusApplicationContext@c21495]: org.springframework.beans.factory.support.DefaultListableBeanFactory@ca0115
- Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ca0115: defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyConstants,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.management.jmx.InstrumentationManagerImpl,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory]; root of factory hierarchy
2009-12-25 16:16:53 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
信息: Creating Service {http://test/}HelloWorldImplService from class test.HelloWorld
2009-12-25 16:16:54 org.apache.cxf.endpoint.ServerImpl initDestination
信息: Setting the server's publish address to be http://localhost:8080/HelloWorld
2009-12-25 16:16:54 org.mortbay.log.Slf4jLog info
信息: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
2009-12-25 16:16:54 org.mortbay.log.Slf4jLog info
信息: jetty-6.1.15
2009-12-25 16:16:54 org.mortbay.log.Slf4jLog info
信息: Started SelectChannelConnector@0.0.0.0:8080





HelloWorldClient:
- Refreshing org.apache.cxf.bus.spring.BusApplicationContext@14b7453: display name [org.apache.cxf.bus.spring.BusApplicationContext@14b7453]; startup date [Fri Dec 25 16:15:58 CST 2009]; root of context hierarchy
2009-12-25 16:15:58 org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
信息: No cxf.xml configuration file detected, relying on defaults.
- Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]]
- Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]]
- Overriding bean definition for bean 'org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory': replacing [Generic bean: class [org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/E:/apache-cxf-2.1/lib/cxf-2.1.jar!/META-INF/cxf/cxf-extension-http.fixml]]
- Bean factory for application context [org.apache.cxf.bus.spring.BusApplicationContext@14b7453]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4b035d
- Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4b035d: defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyConstants,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.management.jmx.InstrumentationManagerImpl,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory]; root of factory hierarchy
2009-12-25 16:16:00 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
信息: Creating Service {http://test/}HelloWorldService from class test.HelloWorld
2009-12-25 16:16:01 org.apache.cxf.endpoint.ServerImpl initDestination
信息: Setting the server's publish address to be http://localhost:8080/HelloWorld
2009-12-25 16:16:01 org.mortbay.log.Slf4jLog info
信息: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
2009-12-25 16:16:01 org.mortbay.log.Slf4jLog info
信息: jetty-6.1.15
2009-12-25 16:16:01 org.mortbay.log.Slf4jLog info
信息: Started SelectChannelConnector@0.0.0.0:8080
Exception in thread "main" java.lang.ClassCastException: org.apache.cxf.endpoint.ServerImpl
at test.HelloWorldClient.main(HelloWorldClient.java:13)
147 楼 leiweisoft 2009-12-25  
期待楼主更新
146 楼 mawencai 2009-12-23  
太感谢楼主了,以前在其他地方都没找到过。

相关推荐

    CXF入门 webService异步调用模式

    CXF入门教程(5)--webService异步调用模式文章配套代码,文中涉及的异步调用客户端的代码放在com.neareast.test.cxf.asyClient包下。原文地址:http://blog.csdn.net/neareast/article/details/7726503

    CXF入门教程(4) -- webService异步调用模式

    CXF入门教程(4) -- webService异步调用模式文章配套代码,文中涉及的异步调用客户端的代码放在com.neareast.test.cxf.asyClient包下。原文地址:http://blog.csdn.net/neareast/article/details/7726503

    CXF打印SOAP报文,记录WebService日志

    ### CXF打印SOAP报文与记录WebService日志 在企业级应用开发中,尤其是涉及到服务端接口(如WebService)的设计与实现时,日志记录变得尤为重要。它不仅可以帮助开发者更好地理解系统运行状况、定位问题所在,还能...

    使用CXF和camel-cxf调用webservice

    总的来说,Apache CXF和camel-cxf提供了强大的工具集,帮助开发者高效地集成和管理Web服务。通过理解这两个框架的工作原理和使用方法,你可以构建出更加灵活、可维护的分布式系统。在开发过程中,务必注意对源码的...

    webService(基于cxf)的完整例子

    在这个基于CXF的Web服务完整例子中,我们将深入探讨CXF的核心概念、配置、以及如何创建和调用Web服务。 1. **CXF框架介绍**:CXF,全称为"Code first eXtended Framework",最初由XFire项目发展而来,后与Apache ...

    springboot整合CXF发布webservice和客户端调用

    SpringBoot整合CXF是将流行的Java Web服务框架CXF与SpringBoot轻量级框架结合,以便更方便地创建和消费Web服务。这个项目提供了一个很好的示例,通过详细注释帮助开发者理解如何在SpringBoot应用中发布和调用Web服务...

    WebService_CXF范例.

    【WebService CXF详解与入门】 WebService是一种允许不同系统之间进行通信和交互的标准协议,它基于HTTP协议,使得应用程序可以无视具体实现细节地调用互联网上的服务。这种技术使得分布式应用程序的发展成为可能,...

    C#动态调用CXF WEBSERVICE框架的共通类

    C#动态调用CXF WEBSERVICE框架共通类。

    WebService CXF 详细教程

    **WebService CXF 详解** **一、WebService简介** WebService是一种基于标准的,可以在不同操作系统、编程语言之间交换数据的Web应用程序。它通过WSDL(Web服务描述语言)定义了服务接口,利用SOAP(简单对象访问...

    CXF框架webservice教程.pdf

    本教程将详细介绍如何使用CXF框架来创建和消费Web服务。 首先,你需要从Apache官方网站下载CXF的开发包,例如在本例中是`apache-cxf-2.4.3.zip`。这个ZIP文件包含了所有必要的JAR文件,你需要将它们添加到你的Java...

    CXF webservice+mybatis

    CXF提供了丰富的API和工具,包括动态客户端生成、WSDL第一和代码第一的Web服务实现、以及强大的扩展机制,使开发者能够根据需求定制自己的服务。 1. **CXF的架构**:CXF的核心组件包括Bus(总线)、Service(服务)...

    cxf做的webservice对外提供接口调用

    【标题】:“cxf做的webservice对外提供接口调用” 【描述】中提到的“webservice对外发布接口全部源码拿起来就能用”,这表明这是一个关于使用Apache CXF框架创建和发布的Web服务项目。Apache CXF是一个开源的Java...

    cxf WebService jar包(1)

    cxf WebService jar包

    Java cxf开发webservice,分别有客户端和服务端

    2.用cxf开发webservice 3.这个服务端和客户端的小demo 在服务端 对外开放接口服务,然后在客户端 调用服务端的方法, 实现客户端(一个javaweb项目)对服务端(javaweb项目)方法的调用, 实际上就是发送和接收消息...

    Java调用CXF WebService接口的两种方式实例

    Java调用CXF WebService接口的两种方式实例 Java调用CXF WebService接口是Java开发者在开发过程中经常遇到的问题。今天,我们将讨论Java调用CXF WebService接口的两种方式实例,即静态调用和动态调用。 静态调用 ...

    SpringBoot框架及CXF发布WebService

    在给定的压缩包文件中,"WebService_Server"可能包含了SpringBoot与CXF集成的服务器端代码示例,而"Webservice_Client"则可能包含CXF客户端调用服务的示例代码。这两个部分可以作为学习和实践SpringBoot发布和消费...

    CXF webservice Demo

    【CXF Webservice Demo】是基于Apache CXF框架的一个示例项目,用于演示如何使用CXF来创建和消费Web服务。Apache CXF是一个开源的Java框架,它允许开发者构建和集成Web服务,支持多种Web服务标准,如SOAP、RESTful ...

    cxf webservice demo

    1. **CXF_HELLO**: 这个项目可能是一个基础的“Hello World”服务,演示了如何使用CXF创建一个简单的Web服务,该服务可能接收一个字符串参数并返回相应的问候信息。 2. **CXF_HELLO_Object**: 此项目可能是对对象...

    CXF WebService 视频和源码

    【CXF WebService 视频和源码】这个资源包主要涵盖了如何利用Apache CXF框架来创建和消费WebService的相关教程,结合了视频教学和实际的源代码,为学习者提供了全面的学习材料。Apache CXF是一个开源的Java服务框架...

Global site tag (gtag.js) - Google Analytics