- 浏览: 295690 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (155)
- Liferay portal研究 (23)
- spring研究 (7)
- Displaytag (2)
- Flash Builder (0)
- 搜索引擎 (12)
- 杂项 (17)
- SCM管理 (7)
- Jquery (5)
- Linux (7)
- Oracle (10)
- httpd集成 (3)
- Maven2 (5)
- 企业管理 (1)
- tomcat高级 (4)
- dos命令 (1)
- ldap (2)
- Java (8)
- webservice (1)
- jetty代码研究 (3)
- OpenCMS (1)
- JMX (2)
- hibernate (5)
- Ant (1)
- js tree (4)
- Quartz (0)
- CMS (1)
- springside (1)
- proxool (1)
- freemarker (1)
- Cookie (1)
- CAS SSO (4)
- mysql (1)
- php (1)
- js (2)
- Asset (1)
- openmeeting (1)
- h2数据库 (2)
- wcf vs java ws (1)
最新评论
-
22199143:
...
当在重启Tomcat容器时 Exception in Thread "HouseKeeper" java.lang.NullPointerException -
liuqq:
一直用Oracle开发,几乎没有接触过其他数据库。使用Mysq ...
The Nested Set Model -
yjsxxgm:
yjsxxgm 写道FFFFFFFFFFFFFFFWWW
java 访问wcf -
yjsxxgm:
FFFFFFFFFFFFFFF
java 访问wcf -
hjp222:
scanIntervalSeconds 是重新启动,并非真正的 ...
Jetty 热部署
For those who wants to use the Apache CXF web service stack instead of Axis 1.
This guide uses the ext environment and describes how to make the remote interface of a service available as web service over Apache CXF.
If you are using the ext environment just do the following things.
1) Downlad the libraries of Apache CXF. (http://cxf.apache.org)
2) Put the following libraries into the ext-lib/portal directory:
cxf-2.2.jar
FastInfoset-1.2.2.jar
geronimo-jaxws_2.1_spec-1.0.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.9.jar
jaxb-xjc-2.1.9.jar
xmlbeans-2.3.0.jar
xml-resolver-1.2.jar
XmlSchema-1.4.4.jar
3) Generate your service code with the servicebuilder. Set the remote interface to "true" in your service.xml.
4) Create a file cxf-spring.xml in ext-impl/META-INF directory with the following content:
<?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:simple="http://cxf.apache.org/simple"
xmlns:soap="http://cxf.apache.org/bindings/soap"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
<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" />
<simple:server id="pojoservice"
serviceClass="com.ext.portlet.reports.service.ReportsEntryService"
serviceBean="#com.ext.portlet.reports.service.ReportsEntryService.impl"
address="/reports">
<simple:dataBinding>
<bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
</simple:dataBinding>
</simple:server>
</beans>
This file demonstrates how to export the ReportsEntryService interface as a web service.
Just change or add your interface and impl classes to the xml file.
5) Add the cxf-spring.xml to the portal-ext.properties. Copy the spring.config section from the portal.properties
and add the cxf-spring.xml entry. E.g.:
spring.configs=\
META-INF/base-spring.xml,\
\
META-INF/hibernate-spring.xml,\
META-INF/infrastructure-spring.xml,\
META-INF/management-spring.xml,\
\
META-INF/util-spring.xml,\
\
META-INF/jcr-spring.xml,\
META-INF/messaging-spring.xml,\
META-INF/scheduler-spring.xml,\
META-INF/search-spring.xml,\
\
META-INF/counter-spring.xml,\
META-INF/document-library-spring.xml,\
META-INF/lock-spring.xml,\
META-INF/mail-spring.xml,\
META-INF/portal-spring.xml,\
META-INF/portlet-container-spring.xml,\
META-INF/wsrp-spring.xml,\
\
META-INF/mirage-spring.xml,\
\
META-INF/ext-spring.xml,\
META-INF/cxf-spring.xml
Thats it. Build and deploy your application. After deploying your web service is available under:
http://localhost:8080/services/<service_name>
In the example above : http://localhost:8080/services/reports
WSDL is available under:
http://localhost:8080/services/<service_name>?WSDL
In the example above : http://localhost:8080/services/reports?WSDL
Can someone confirm, I didn't missed something?
This guide uses the ext environment and describes how to make the remote interface of a service available as web service over Apache CXF.
If you are using the ext environment just do the following things.
1) Downlad the libraries of Apache CXF. (http://cxf.apache.org)
2) Put the following libraries into the ext-lib/portal directory:
cxf-2.2.jar
FastInfoset-1.2.2.jar
geronimo-jaxws_2.1_spec-1.0.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.9.jar
jaxb-xjc-2.1.9.jar
xmlbeans-2.3.0.jar
xml-resolver-1.2.jar
XmlSchema-1.4.4.jar
3) Generate your service code with the servicebuilder. Set the remote interface to "true" in your service.xml.
4) Create a file cxf-spring.xml in ext-impl/META-INF directory with the following content:
<?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:simple="http://cxf.apache.org/simple"
xmlns:soap="http://cxf.apache.org/bindings/soap"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
<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" />
<simple:server id="pojoservice"
serviceClass="com.ext.portlet.reports.service.ReportsEntryService"
serviceBean="#com.ext.portlet.reports.service.ReportsEntryService.impl"
address="/reports">
<simple:dataBinding>
<bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
</simple:dataBinding>
</simple:server>
</beans>
This file demonstrates how to export the ReportsEntryService interface as a web service.
Just change or add your interface and impl classes to the xml file.
5) Add the cxf-spring.xml to the portal-ext.properties. Copy the spring.config section from the portal.properties
and add the cxf-spring.xml entry. E.g.:
spring.configs=\
META-INF/base-spring.xml,\
\
META-INF/hibernate-spring.xml,\
META-INF/infrastructure-spring.xml,\
META-INF/management-spring.xml,\
\
META-INF/util-spring.xml,\
\
META-INF/jcr-spring.xml,\
META-INF/messaging-spring.xml,\
META-INF/scheduler-spring.xml,\
META-INF/search-spring.xml,\
\
META-INF/counter-spring.xml,\
META-INF/document-library-spring.xml,\
META-INF/lock-spring.xml,\
META-INF/mail-spring.xml,\
META-INF/portal-spring.xml,\
META-INF/portlet-container-spring.xml,\
META-INF/wsrp-spring.xml,\
\
META-INF/mirage-spring.xml,\
\
META-INF/ext-spring.xml,\
META-INF/cxf-spring.xml
Thats it. Build and deploy your application. After deploying your web service is available under:
http://localhost:8080/services/<service_name>
In the example above : http://localhost:8080/services/reports
WSDL is available under:
http://localhost:8080/services/<service_name>?WSDL
In the example above : http://localhost:8080/services/reports?WSDL
Can someone confirm, I didn't missed something?
发表评论
-
ogl的入门
2010-03-30 08:24 1416http://jxb8901.iteye.com/blog/2 ... -
jaas 入门
2010-03-04 17:10 1910本例是认证的实现,JAAS定义了可插拔的认证机制,使认证逻辑独 ... -
JAAS HelloWorld
2010-03-04 17:09 1264Examples: JAAS HelloWorld Thes ... -
liferay sso
2010-01-28 16:18 2335基于Liferay的CAS SSO ... -
liferay 权限
2010-01-04 13:49 1587liferay的权限很多资料说 ... -
liferay多数据源
2009-12-15 15:46 1786Configure MySQL Master/Slave ... -
杂项2
2009-11-18 21:44 920function <portlet:namespace ... -
LiferayCounter机制
2009-10-24 14:08 1059public long increment(String na ... -
lifery 老的资源
2009-10-23 14:40 879http://docs.liferay.com/portal/ ... -
liferay portal 的开发目录结构
2009-10-17 11:59 1731portal-kenel.jar 不依赖任何非标准jar(只依 ... -
liferay 常用urls
2009-10-16 22:43 955http://blog.csdn.net/smilingleo ... -
liferay 调用webservice
2009-10-16 22:34 4547Liferay是基于SOA理念设计的,很容易通过Web Ser ... -
Database Sharding
2009-10-15 12:40 1591Database sharding is a way of s ... -
Liferay权限管理的讲解
2009-10-12 21:37 1542这篇文章讲解了liferay中使用的权限管理系统的内部细节,涉 ... -
ServiceContext Pattern
2009-10-12 21:30 1036The Service Context is an objec ... -
Liferay性能调优
2009-10-12 21:25 2206CONTRIBUTIONS WANTED Corné|Corn ... -
Liferay重要对象-Layout
2009-10-12 21:19 2225A layout is an instance of a si ... -
liferay常用配置
2009-10-12 20:47 1165在实际需求中,如果是做网站那我们有时候会有这样的需求,即希望用 ... -
liferay学习系列(3)
2009-10-11 20:16 1250在一个Portlet中链接到另一个Portlet 这个问题,应 ... -
liferay学习系列(2)
2009-10-07 20:31 6967想做个用户积分管理,类似于论坛积分的概念,首先在用户管理里面添 ...
相关推荐
**实战Web Service与Apache CXF开发** Web服务是一种在互联网上进行通信的标准协议,它允许应用程序之间进行数据交换。Apache CXF是一个开源框架,用于构建和部署Web服务,支持多种Web服务标准,如SOAP、RESTful ...
它基于WSDL(Web Services Description Language)定义服务接口,使用SOAP(Simple Object Access Protocol)进行消息传输,通过UDDI(Universal Description, Discovery, and Integration)进行服务发现。Apache ...
Web Services Standards Support: CXF supports a variety of web service standards including SOAP, the Basic Profile, WSDL, WS-Addressing, WS-Policy, WS-ReliableMessaging, WS-Security, WS-SecurityPolicy,...
2. **协议支持**:CXF支持多种协议,如HTTP、HTTPS、JMS(Java Message Service)和JBI(Java Business Integration)。这些协议使得CXF能够灵活地适应不同的网络环境和应用需求。 3. **数据绑定**:CXF提供了强大的...
Apache CXF 是一款开源框架,专门用于实现和消费 Web Service,它支持多种协议和服务样式,如 SOAP、RESTful API,并且能够与各种编程语言和平台集成。本文将深入探讨使用 Apache CXF 实现 Web Service 的相关知识点...
Web Service是一种通过WSDL(Web服务描述语言)定义,使用SOAP(Simple Object Access Protocol)作为消息交换格式,通过UDDI(Universal Description, Discovery and Integration)进行发布和查找的服务。...
Apache CXF是目前最活跃的Web Service框架之一,它整合了XFire和Apache SOAP项目的优势。CXF不仅支持SOAP,还支持RESTful风格的服务,提供了一种统一的API来处理两种类型的Web Service。CXF的强项在于其强大的功能集...
【描述】中提到的"CXF调用Web service"是指Apache CXF框架,它是一个开源的Java框架,用于构建和消费Web服务。Web服务是一种通过互联网进行通信的软件系统,允许不同的应用程序之间进行交互。CXF提供了丰富的工具和...
- **UDDI(Universal Description, Discovery, and Integration)**: UDDI 是一个目录服务,允许服务提供者注册他们的 Web Service,而服务消费者则可以查找并访问这些服务。 1. **Web Service 的特点** - **跨...
- 学习使用不同的工具,如Apache CXF或Glassfish,创建和部署Web Service。 - 实践安全方面,如WS-Security,以保护Web Service免受攻击。 通过这个简单的入门示例,你可以了解Web Service的基本工作原理。然而,...
在Java世界里,Apache CXF、XFire(现已被CXF合并)等框架是实现Web Service的重要工具。 XFire,全称为XFire Java SOAP Framework,是一个轻量级的Web Service框架,它简化了开发过程,提供了快速构建Web Service...
1.3.3 CXF:CXF是另一个流行的开源Web Service框架,它结合了Xfire和Apache SOAP项目的优点,支持多种Web Service规范,并且可以与Spring框架无缝集成。 1.3.4 主流 Web Service 的比较 Axis适合初学者,因为它的...
或者,你可以使用诸如Apache CXF或Glassfish等Web服务容器来部署服务。 4. **生成WSDL**:Java服务端会自动生成一个描述服务的WSDL文件,客户端可以通过这个文件了解如何调用服务。 5. **消费Web Service**:...
Apache CXF是一个开源的Java框架,用于构建和部署SOAP(Simple Object Access Protocol)和RESTful(Representational State Transfer)Web服务。这份资料集合了CXF的核心概念、配置、扩展以及与其他技术的集成,...
Apache CXF是一个开源的Java框架,它提供了构建和部署Web服务的工具和API。CXF不仅支持SOAP,还支持RESTful服务,使得开发更加灵活。 ### 1. WebService基础知识 - **WSDL(Web Service Description Language)**...