1.ngbusi调用ngbusiControl
nugbusi层:
(1)写一个action.java
OutputObject object = super.getOutputObject();//得到control.xml中的service和method放入到inputObject
super.sendJson(super.convertOutputObject2Json(object));
super.getOutputObject()的源代码如下:
public InputObject getInputObject() {
inputObject = (InputObject) ServletActionContext.getContext().get(ControlConstants.INPUTOBJECT);
return inputObject;
}
(2)在spring-action.xml中进行bean的配置
<bean id="scansionCodeInfoAction" class="com.cmos.ngbusi.action.customization.ScansionCodeInfoAction" parent="baseAction" scope="prototype"/>
(3)control.xml中配置前台调用的uid
<action path="/front/sh/scansionCodeInfoAction!execute">
<input uid="s001" service="scansionCodeInfoService" method="queryScansionCodeInfo" desc="互联网二维码扫描新增接口查询" >// 这里的service指的是ngbusiControl层中spring.xml中配置的bean id,
<parameter key="limit" toKey="limit" />
<parameter key="page" toKey="page" />
</input>
<input uid="s002" service="scansionCodeInfoService" method="insertScansionCodeInfo" desc="互联网二维码扫描新增接口新增" >
</input>
<input uid="s003" service="scansionCodeInfoService" method="updateScansionCodeInfo" desc="互联网二维码扫描新增接口更新" >
</input>
</action>
(4)在struts-share.xml中配置action
<!-- 互联网二维码扫描 -->
<action name="scansionCodeInfoAction!*" class="scansionCodeInfoAction" method="{1}" />
ngbusiControl层:
(1)spring-all.xml中配置bean
(2)写一个interface和impl
2.ngbusiControl层调用ngbusicore层
ngbusiControl层:
(1)在impl中直接调用
inputObject.setService("scansionCodeInfoService");
inputObject.setMethod("queryScansionCodeInfo");
BaseServiceImpl.getNgbusiRemoteSV().execute(inputObject, outputObject);
ngbusicore层:
(1)spring-services.xml中配置bean
(2)写service层
3.ngcrmpfcore层调用ngbusiControl层
ngcrmpfcore层:
(1)写一个platform类
CsfResponse csfResponse =CsfServiceCaller.call("NGBUSI_JX_SCANSIONCODEINFO_POST", mapParams);//直接连调用
(2)spring-platform-servicces.xml中配置bean
(3)(老版本)csf-develope.xml中配置Item
(新版本)在csf.propertites中配置送
ngbusiControl层:
(1)control.xml中配置暴露给ngcrmpfcore层的action
(2)spring-services.xml中配置bean
(3)写service层
关于新客服的ngbusi三层调用方式
猜你喜欢
转载自www.cnblogs.com/lirenzhujiu/p/9285022.html
今日推荐
周排行