消息中心webservice接口使用说明
一、EAS消息中心主动向第三方系统推送消息
使用此功能需要实现一个接口MessageWebServiceDao
接口全路径:com.kingdee.eas.base.message.webservice.MessageWebServiceDao
接口类所在包名:bs_message-server.jar
接口方法说明:
1、public boolean addMessage(WSMessage message) 用于在第三方系统中添加消息,其中参数message包含一些消息的信息(信息的详细内容在后面会有说明)
这个方法在消息中心获得新的消息的时候会主动调用
2、public boolean removeMessage(String ID); 用于EAS消息中心主动删除第三方系统相应的消息记录,参数ID是WSMessage中的MsgID字段的值
这个方法是在消息中心删除消息的时候会调用。
3、public boolean updateMessage(String ID) 与消息中心消息状态同步接口(主要用于消息的状态更新同步),参数ID是WSMessage中的MsgID字段的值。
这个接口是现实的是当鼠标点击在某条消息(单条消息)上时改变消息状态的情况下被调用。
以上三个接口是受到eas\Server\server\deploy\portalConfig下的WSConfig.xml配置文件控制。配置文件的说明后面说明。
4、public boolean updateMessages(String IDs, MsgStatus state) 与消息中心消息状态同步接口(主要用于消息的状态更新同步),参数IDs
是多条消息的MsgID的值的集合,state是要设置消息的状态值,这个接口是在界面上按下“设置消息已读”或“未读”按钮时被调用。此接口不受WSConfig.xml配置文件控制。
配置文件说明:
1、eas\ server\deploy\portalconfig下 (\eas\server\profiles\server1\config\portalConfig)
easWebConfig.xml文件中有如下的配置项
<configitem name="otherSystem">
<!--是否启用与第三方系统消息集成-->
<attribute key="toSys" value="true" />
<attribute key="letGet" value="true"/>
</configitem>
请确认<attribute key="toSys" value="true" />配置项的value值是“true”,来启用该功能
2、eas\ server\deploy\portalconfig下
WSConfig.xml文件中配置信息
<?xml version="1.0" encoding="utf-8"?>
<config>
<class>
<server>http://127.0.0.1:6888/easportal?toPage=SYS_PC</server> //EAS portal消息中心的url
<dataCenter>db540</dataCenter> //数据中心编码
<path>com.kingdee.eas.base.message.webservice.testWebServiceImpl</path> //实现类的包名加类名
<task value="true"> //任务类型消息是否接受
<workflow>true</workflow> //任务类型消息节点下的工作流消息是否接受
</task>
<notice value="true"> //通知类型消息是否接受
<workflow>true</workflow> //通知类型消息节点下的工作流消息是否接受
<forwarn>true</forwarn> //通知类型消息节点下的预警消息是否接受
<urgent>true</urgent> //通知类型消息节点下的催办消息是否接受 </notice>