cxf 开发webservice 的两种实现方式

网上有许多开发webservice 的博客,不知道咋的我就是看不懂,所以在本人的努力下写这篇博客,希望对需要的人有用,还有许多人弄个破helloworld 程序收人金币本人黑恼火,所以发表这篇播客,cxf-servlet等配置在高版本的cxf中不需要引入,cxf有很多jar 包我也不知道干什么用的,所以这些jar 包是我根据别人的成果尝试后一步步试出来的,还有许多鬼儿子的弄个破jar 包在网上买,所以我打算用maven来搭建项目,学习的路是艰难的,现在网上许多博客好像和你打游击一样,谁也有是新手的时候,摸不着东西时候学习是痛苦的,我最恨的是妈的收保护费弄个破文档质量不知道咋样在网上卖,无耻!,虽然我没有多少C币。

首先需要了解一一下这两个基本的知识

JAX-WS:全称是JavaTM API forXML-Based Web Services
JAX-RS :全称是 JavaTM API forRESTful Web Services

搭建环境使用maven 导入jar包和配置web.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
	http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.huawei.it</groupId>
	<artifactId>cxf</artifactId>
	<packaging>war</packaging>
	<version>0.0.1-SNAPSHOT</version>
	<name>cxf</name>
	<description>cxf</description>
	<properties>
		<junit.version>4.9</junit.version>
		<spring.version>4.3.14.RELEASE</spring.version>
		<mybatis.version>3.2.8</mybatis.version>
		<mybatis.spring.version>1.2.2</mybatis.spring.version>
		<slf4j.version>1.6.4</slf4j.version>
		<druid.version>1.0.9</druid.version>
		<servlet-api.version>2.5</servlet-api.version>
		<jsp-api.version>2.0</jsp-api.version>
		<commons-lang3.version>3.3.2</commons-lang3.version>
		<commons-io.version>1.3.2</commons-io.version>
		<cxf.version>3.2.2</cxf.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.apache.cxf</groupId>
    		<artifactId>cxf-rt-transports-http</artifactId>
    		<version>${cxf.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.apache.cxf</groupId>
    		<artifactId>cxf-rt-transports-udp</artifactId>
    		<version>${cxf.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.apache.cxf</groupId>
    		<artifactId>cxf-rt-databinding-jaxb</artifactId>
    		<version>${cxf.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.apache.cxf</groupId>
    		<artifactId>cxf-rt-frontend-simple</artifactId>
    		<version>${cxf.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.apache.cxf</groupId>
    		<artifactId>cxf-rt-frontend-jaxws</artifactId>
    		<version>${cxf.version}</version>
		</dependency>
  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值