InterSystem Ensemble: BS-> BP-> BO

1, BS:数据输入端(webservice)

File --> New --> Production–> Business Service: 选择soap inbound adapter

Class test.LisInBS Extends EnsLib.SOAP.Service
{

Parameter ADAPTER;
/// Name of the WebService
Parameter SERVICENAME = "LisInBS";
Parameter NAMESPACE = "http://tempuri.org";

Method lisin(pInput As MSG.LisInPatient) As %String [ WebMethod ]
{
   $$$LOGINFO( "xxxxx_in"_pInput) 
   //同步发送数据,等待方法返回值---> bp
   set res= ..SendRequestSync("test..BP.LISBPL", pInput, .backdata)
   Quit "backdata: "_backdata
}

Method lisout(pInput As MSG.LisOutPatient) As %String [ WebMethod ]
{
	$$$LOGINFO( "xxxxx_out"_pInput)
	//异步发送数据,没有返回值---> bp
    set res= ..SendRequestAsync("test..BP.LISBPL", pInput)
    Quit "good"
}
}

2, BP: 逻辑处理

在这里插入图片描述

3, BO: 数据流出端

Class test.BO.LisInBO Extends Ens.BusinessOperation
{
Parameter ADAPTER = "EnsLib.SOAP.OutboundAdapter";
Property Adapter As EnsLib.SOAP.OutboundAdapter;
Parameter INVOCATION = "Queue";

Method addIn(pRequest As MSG.LisInPatient, Output pResponse As Ens.Response) As %Status
{
	$$$LOGINFO("---"_ pRequest)
	Quit 1
}

Method addOut(pRequest As MSG.LisOutPatient, Output pResponse As Ens.Response) As %Status
{
	$$$LOGINFO("---"_ pRequest)
	Quit 1
}

XData MessageMap
{
<MapItems>
	<MapItem MessageType="MSG.LisInPatient"> 
		<Method>addIn</Method>
	</MapItem>
	<MapItem MessageType="MSG.LisOutPatient"> 
		<Method>addOut</Method>
	</MapItem>
</MapItems>
}
}
发布了276 篇原创文章 · 获赞 37 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/eyeofeagle/article/details/103578175