到apache 下载cxf需要的包,最好jdk6.0免得出错
public class WebserviceServer {
public WebserviceServer(){
HelloServiceImpl hello = new HelloServiceImpl();
ServerFactoryBean factory = new ServerFactoryBean();
factory.setServiceClass(IHelloService.class);
factory.setAddress("http://127.0.0.1:9000/Hello");
factory.setServiceBean(hello);
factory.create();
}
public static void main(String[] args) throws InterruptedException {
new WebserviceServer();
System.out.println("server starting......");
Thread.sleep(60*1000);
System.out.println("server exit");
System.exit(0);
}
启动server
浏览器查看:
http://127.0.0.1:9000/Hello?WSDL
调用webservice
public class Client {
public static void main(String[] args) {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(IHelloService.class);
factory.setAddress("http://127.0.0.1:9000/Hello");
IHelloService hello = (IHelloService) factory.create();
System.out.println(hello.sayHello("hello lmning"));
}
}
ok!
分享到:
相关推荐
CXF源码:CXF_Spring源码 CXF源码:CXF_Spring源码
CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载 CXF下载
CXF入门 -- 第一个简单webService文章对应的代码;原文链接http://blog.csdn.net/neareast/article/details/7714778
WebService CXF 用了一天时间找,官网打不开,国内要积分,下下来又永不了。最后终于搞到手,上传上来分享给大家。 jdk版本 CXF版本 java 9及以上 3.3.x java 8 3.x java 7 2.2x --- 3.2之前版本 java 6 3.1 ...
cxf服务端开发
Spring CXF Restful 实例
Apache CXF是一个开源的Service框架,它实现了JCP与Web Service中一些重要标准。CXF简化了构造,集成,面向服务架构(SOA)业务组件与技术的灵活复用。在CXF中,Service使用WSDL标准定义并能够使用各种不同的消息格式...
CXF Webservice 开发手册
Web Service Cxf转换器的示例,包含源码和jar包。
利用Apache CXF开发webservice接口需要用到的jar集合 cxf-core-3.0.15.jar cxf-rt-bindings-soap-3.0.15.jar cxf-rt-bindings-xml-3.0.15.jar cxf-rt-databinding-jaxb-3.0.15.jar cxf-rt-frontend-jaxws-3.0.15.jar...
Apache CXF = Celtix + XFire,开始叫 Apache CeltiXfire,后来更名为 Apache CXF 了,以下简称为 CXF。CXF 继承了 Celtix 和 XFire 两大开源项目的精华,提供了对 JAX-...Apache CXF已经是一个正式的Apache顶级项目。
用cxf2.2.4版本写的一个小例子,如果用eclipse开发的话, 可以直接导入便可运行. 下载cxf把jar导入到项目的lib下
spring 4.2.0 集成的cxf3.1.18的jar包,cxf-core-3.1.18.jar、cxf-rt-bindings-soap-3.1.18.jar、cxf-rt-databinding-jaxb-3.1.18.jar、cxf-rt-frontend-jaxws-3.1.18.jar、cxf-rt-frontend-simple-3.1.18.jar、cxf-...
使用jdk1.6、cxf2.3和tomcat开发的一个关于验证码的webservice接口,主要实现对手机验证码的验证。
cxf spring maven 实例 webservice
apache-cxf-2.5.2
CXF 客户端最少jar包支持,CXF 客户端最少jar包支持,CXF 客户端最少jar包支持,
Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such ...
<import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
cxf soap header cxf soap header cxf soap header cxf soap header