【发布时间】:2016-08-17 20:42:33
【问题描述】:
需要一些关于扩展现有功能(在 SI 项目中实现)以支持基于 SOAP 的 Web 服务的指针。
这是我的场景:
我有一个实现核心功能的 SI 项目。目前,SI 项目支持通过 JMS 进行消息交换。 核心功能经过良好测试,作为独立应用程序在生产区域运行良好。
现在出现了一个增强请求,我需要为 SOAP 客户端提供支持。 SOAP 客户端将使用与 JMS 客户端相同的核心功能。
- jms-endpoint.xml:定义 JMS 请求-回复交互细节。
- core-func.xml :定义核心功能(为本文简化)。根据 JMS 消息中传递的员工 ID,它返回 Promotion Eligibility 标志。
问题: 1. 是否可以利用现有的 SI 代码添加对 SOAP 客户端的支持?
我不想将核心功能移至 servlet 容器并重新测试在 JMS 客户端上运行良好的整个独立 SI 项目。
jms-endpoint.xml
<beans xmlns="http://www.springframework.org/schema/beans" .... >
<import resource="queue.xml"/>
<import resource="core-func.xml"/>
<int:channel id="inboundMessage"/>
<int-jms:inbound-gateway request-channel="inboundMessage"
request-destination="requestQueue" default-reply-destination="responseQueue"/>
</beans>
core-func.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" ....>
<int:chain input-channel="inboundMessage">
<int:service-activator ref="employeeService" method="getEmployeeData"/>
<int:service-activator ref="eligibilityService" method="getPromotionEligibility" />
</int:chain>
<bean id="eligibilityService" class="com.samples.service.EligibilityService" />
<bean id="employeeService" class="com.samples.service.EmployeeService">
<property name="employeeDao" ref="employeeDao"/>
</bean>
<bean id="employeeDao" class="com.samples.dao.EmployeeDao" />
</beans>
【问题讨论】: