多个EOS系统之间怎样通过http方式访问EOS服务(逻辑流和SCA服务)

来源:互联网 发布:java开源报表系统 编辑:程序博客网 时间:2024/06/11 08:11

【场景描述】:

 

有几个EOS业务系统,其中一个EOS应用需要通过     http的方式访问另外一个EOS应用

 

 

 

 

 

【解决方案】

 

 

步骤1:服务提供者配置:

配置文件User-local-config.xml,配置内容如下:

<module name="ChannelsSecurity">

        <group name="channels2">

            <configValue key="protocol">http</configValue>

            <configValue key="ip">127.0.0.1</configValue>

            <configValue key="port">8080</configValue>

            <configValue key="webContext">default</configValue>

            <configValue key="user">sysadmin</configValue>

            <configValue key="password">{3DES}G38YipCqmg6RIjeq4gyvW0Q=</configValue>

        </group>

 

 

步骤2:在服务提供者那里进行服务注册(governor->添加服务注册)

 

 

 

步骤3:服务调用者配置:

配置文件:User-local-config.xml,配置内容如下:

     <module name="ChannelsSecurity">

<group name="channels2">

            <configValue key="protocol">http</configValue>

            <configValue key="ip">127.0.0.1</configValue>

            <configValue key="port">8080</configValue>

            <configValue key="webContext">default</configValue>

            <configValue key="user">sysadmin</configValue>

            <configValue key="password">{3DES}G38YipCqmg6RIjeq4gyvW0Q=</configValue>

        </group>

 

 

步骤4:服务调用者调用代码:

SCA服务调用


 

ServiceContext context=new ServiceContext();


 

String serviceName="com.primeton.etrade.common.stockOperation.QueryService";


 

IServiceCaller
  caller=context.locateServiceCall(serviceName); 


 

Object[] rets=caller.invoke("StockQueryService",new Object[0]);


 

逻辑流调用


 

ServiceContext context=new ServiceContext();


 

String
  componentName="com.primeton. etrade.stock ";


 

ILogicComponent
  component=context.locateServiceCall(componentName);


 

Object[] rets=component.invoke("StockService",new Object[0]);


 

 

0 0
原创粉丝点击