- 浏览: 7862494 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (2425)
- 软件工程 (75)
- JAVA相关 (662)
- ajax/web相关 (351)
- 数据库相关/oracle (218)
- PHP (147)
- UNIX/LINUX/FREEBSD/solaris (118)
- 音乐探讨 (1)
- 闲话 (11)
- 网络安全等 (21)
- .NET (153)
- ROR和GOG (10)
- [网站分类]4.其他技术区 (181)
- 算法等 (7)
- [随笔分类]SOA (8)
- 收藏区 (71)
- 金融证券 (4)
- [网站分类]5.企业信息化 (3)
- c&c++学习 (1)
- 读书区 (11)
- 其它 (10)
- 收藏夹 (1)
- 设计模式 (1)
- FLEX (14)
- Android (98)
- 软件工程心理学系列 (4)
- HTML5 (6)
- C/C++ (0)
- 数据结构 (0)
- 书评 (3)
- python (17)
- NOSQL (10)
- MYSQL (85)
- java之各类测试 (18)
- nodejs (1)
- JAVA (1)
- neo4j (3)
- VUE (4)
- docker相关 (1)
最新评论
-
xiaobadi:
jacky~~~~~~~~~
推荐两个不错的mybatis GUI生成工具 -
masuweng:
(转)JAVA获得机器码的实现 -
albert0707:
有些扩展名为null
java 7中可以判断文件的contenttype了 -
albert0707:
非常感谢!!!!!!!!!
java 7中可以判断文件的contenttype了 -
zhangle:
https://zhuban.me竹板共享 - 高效便捷的文档 ...
一个不错的网络白板工具
1 pom.xml
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.2.1.RELEASE</version>
</dependency>
<!-- JAX-WS -->
<dependency>
<groupId>org.jvnet.jax-ws-commons.spring</groupId>
<artifactId>jaxws-spring</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.8</version>
</dependency>
2 web.xml
3 customer.java
4
5
6 endpoint:
7 配置文件:
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.2.1.RELEASE</version>
</dependency>
<!-- JAX-WS -->
<dependency>
<groupId>org.jvnet.jax-ws-commons.spring</groupId>
<artifactId>jaxws-spring</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.8</version>
</dependency>
2 web.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>SOAPWebServiceExample</display-name> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>customer</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>customer</servlet-name> <url-pattern>/customer</url-pattern> </servlet-mapping> </web-app>
3 customer.java
package com.jcombat.entity; public class Customer { private int id; private String name; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
4
package com.jcombat.services.customers; import com.jcombat.entity.Customer; public interface CustomerService { public Customer getCustomerById(String customerId); }
5
package com.jcombat.services.customers; import com.jcombat.entity.Customer; public class CustomerServiceImpl implements CustomerService { public Customer getCustomerById(String customerId) { Customer customer = new Customer(); customer.setId(123); customer.setName("Abhimanyu"); return customer; } }
6 endpoint:
package com.jcombat.ws; import javax.jws.WebMethod; import javax.jws.WebService; import com.jcombat.entity.Customer; import com.jcombat.services.customers.CustomerService; @WebService(serviceName = "customerService") public class CustomerEndpoint { private CustomerService service; @WebMethod(exclude = true) public void setService(CustomerService service) { this.service = service; } @WebMethod(operationName = "getCustomer") public Customer getCustomerById(String customerId) { Customer customer = service.getCustomerById(customerId); return customer; } }
7 配置文件:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ws="http://jax-ws.dev.java.net/spring/core" xmlns:wss="http://jax-ws.dev.java.net/spring/servlet" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://jax-ws.dev.java.net/spring/core http://jax-ws.java.net/spring/core.xsd http://jax-ws.dev.java.net/spring/servlet http://jax-ws.java.net/spring/servlet.xsd"> <bean id="customerService" class="com.jcombat.services.customers.CustomerServiceImpl"> </bean> <bean id="customerEndpoint" class="com.jcombat.ws.CustomerEndpoint"> <property name="service" ref="customerService" /> </bean> <wss:binding url="/customer"> <wss:service> <ws:service bean="#customerEndpoint" /> </wss:service> </wss:binding> </beans>
发表评论
-
复习:强迫线程顺序执行方式
2019-01-03 23:42 1495方法1: 三个线程,t1,t2,t3,如果一定要按顺序执行, ... -
(转)不错的前后端处理异常的方法
2019-01-02 23:16 1971前言 在 Web 开发中, 我们经常会需要处理各种异常, 这是 ... -
info q的极客时间大咖说等资料下载
2018-08-15 08:40 3420info q的极客时间大咖说等资料下载,还有不少思维导图 链 ... -
CXF 客户端超时时间设置(非Spring配置方式)
2018-07-03 22:38 2192import org.apache.cxf.endpoint. ... -
(转)synchronized关键字画像:正确打开方式
2018-06-14 09:25 454https://mp.weixin.qq.com/s/b3Sx ... -
CountDownLatch的例子
2018-06-13 14:10 637public class StatsDemo { ... -
两道面试题,带你解析Java类加载机制
2018-06-12 16:29 562https://mp.weixin.qq.com/s/YTa0 ... -
Spring中获取request的几种方法,及其线程安全性分析
2018-06-11 09:03 631https://mp.weixin.qq.com/s/KeFJ ... -
内部类小结
2018-06-06 10:25 404https://mp.weixin.qq.com/s/hErv ... -
JVM虚拟机小结1
2018-06-04 20:43 4681 jps -l //列出详细的类名和进程ID 2)jps ... -
windows下自带命令行工具查看CPU资源情况等
2018-06-04 12:53 3048微软提供了不少命令行 ... -
(收藏)深入分析Java的序列化与反序列化
2018-05-30 15:21 566https://mp.weixin.qq.com/s/T2Bn ... -
apache common包中的序列化工具
2018-05-30 09:10 1788什么是序列化 我们的 ... -
JAVA8 JVM的变化: 元空间(Metaspace)
2018-05-24 22:30 918本文将会分享至今为至我收集的关于永久代(Permanent G ... -
(转)服务器性能指标(一)——负载(Load)分析及问题排查
2018-05-21 21:03 1272原创: Hollis Hollis 负载 ... -
(转)对象复用
2018-05-20 15:27 815public class Student { priv ... -
mapreduce中入门中要注意的几点
2018-05-06 08:59 626在 mapreduce中,比如有如下的词: I love b ... -
HDFS的基本操作
2018-05-02 21:47 889-mkdir 在HDFS创建目录 ... -
一个不错的开源工具类,专门用来解析日志头部的,好用
2018-05-02 20:00 716一个不错的开源工具类,专门用来解析日志头部的,好用。 http ... -
介绍个不错的RESTFUL MOCK的工具wiremock
2018-04-27 21:02 1860介绍个不错的RESTFUL MOCK的工具wiremock,地 ...
相关推荐
java开发中的jax-ws和spring的整合的开发的比较全面的整合的步骤.
JAX-WS + Spring 实现webService示例
jax-ws与spring整合时需要添加两个jar包,即jaxws-spring-1.8.jar和xbean-spring-3.6.jar
webservice jax-ws-spring 视频
JAX-WS + Spring 实现webService示例.docxJAX-WS + Spring 实现webService示例.docx
这是我学习Spring3.2.8 JAX-WS时候做的基于注解的一个联系程序,使用Tomcat6测试通过了,用SOAPUI做的访问测试,希望可以帮助初次学习者部分的朋友理清思路。
JavaWeb服务SOAP(jax-ws)和REST(jax-rs)规范,CXF整合Spring和未整合Spring的简单例子。结合说明看,简单易懂:my.oschina.net/lock0818/blog/314120
使用jax-ws和jax-rs ,maven、java、spring 分别创建soap类型的webservice和restful类型的webservice,文档附有代码
JAX-WS 与 Spring 框架的示例应用程序 该项目提供了两个示例应用程序。 使用 Spring 框架 + JAX-WS(Apache CXF) 使用 Spring Framework + JAX-WS(JDK HTTP Server) 主要框架和库 此示例应用程序使用 TERASOLUNA ...
使用 Maven 的简单 JAX-WS 和 Spring4 集成示例。 这个怎么运作? 将“weather-station-impl”项目部署到 Tomcat 7 服务器。 将 CountryConsumerClient.java 或 ServiceConsumerClient.java 作为 Java 应用程序...
activation.jar FastInfoset.jar gmbal-api-only.jar ha-api.jar http.jar javax.annotation.jar javax.mail_1.4.jar jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar jaxws-api.jar jaxws-rt.jar ...一共31个jar包
对于那些想要构建RESTful Web Services的开发者来说,JAX-RS给出了不同于JAX-WS(JSR-224)的另一种解决方案。目前共有4种JAX-RS实现,所有这些实现都支持Spring,Jersey则是JAX-RS的参考实现,也是本文所用的实现。...
自己写的spring+jax-ws+手写的连接池,然后webService接口传参传入有复杂的List传参(非JSON)
20020414.jar,slf4j-api-1.5.8.jar,slf4j-log4j12-1.5.8.jar,spring-aop-3.0.7.RELEASE.jar,spring-asm-3.0.7.RELEASE.jar,spring-beans-3.0.7.RELEASE.jar,spring-context-3.0.7.RELEASE.jar,spring-core-3.0.7....
使用 Maven 的简单 JAX-WS 和 Spring4 集成示例。 这个怎么运作? 将“weather-station-impl”项目部署到 Tomcat 7 服务器。 将 CountryConsumerClient.java 或 ServiceConsumerClient.java 作为 Java 应用程序...
JAX-WS-Web-Service-with-Apache-CXF-and-Spring-frameworks。
Spring 和 Apache CFX 来创建 JAX-WS Web 服务
春天 使用 Apache CXF 和 Spring Framework 的 WebService(JAX-WS 和 JAX-RS) Apache CXF: : Spring 框架: : 我想分享有关使用 Spring Framework 的 Web 服务的更多信息。
原来的jax-ws不知道为什么总是不成功,最后放弃,换成这个。具体过程可以参考官网:http://docs.spring.io/spring-ws/site/reference/html/tutorial.html
不用说了,自己整理的。绝对实用,错过了是你的错