WebService另类用法之一,运维
在新建的流程平台上,有流程待办任务与集团云门户待办任务同步接口功能,在与集团云门户维护人员联调测试中,在云门户待办任务中产生了些测试数据,由于沟通原因,未及时清理,在周一上班时,反馈很对稽核数据。 由于测试数据量较大,对方数据不开发方等原因,很难掌握何人云门户待办界面有我们系统的待办数据。 怎么办? 第一步:先清理本地专业系统测试数据,并反馈给云门户维护,请他们也清理涉及到我们新应用的测试数据; 第二步:通过后台维护手段,消除云门户待办界面的待办数据 由于云门户维护有时间限定,如果着急消除用户界面上的待办,需要通过后台维护手段,来消除云门户待办界面的待办数据。 这种维护需求,使用频率很低,一般会发生在上线初期,以及后续偶尔发生,如果为此开发维护界面,特别新系统上线初期,不太核算。 为此,我们采用使用系统已有的WebService来完成这项任务。 1、使用系统平台,Cordys BOP 4开发环境中“Test Web Gatway”工具,如下图所示: 2、使用已有向云门户推送待办任务的WebService。 (1)、更新待办状态的WebService请求:UpdateTaskStatus 把下面代码放入Resquest Message输入框中(先清空),再按“START”按钮。 <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<UpdateTaskStatus xmlns="http://unicom.com/workflow" preserveSpace="no" qAccess="0" qValues="">
<taskXml>
<PendingCode>47107ee7-04c9-11e5-f832-d5d4c64e1f64</PendingCode>" +
<PendingTitle></PendingTitle>" +
<PendingDate></PendingDate>" +
<LastUpdateDate></LastUpdateDate>" +
<PendingURL></PendingURL>" +
<PendingStatus>1</PendingStatus>" +
<PendingLevel>1</PendingLevel>" +
<PendingSourceUserID>xiaoyw3</PendingSourceUserID>" +
<PendingSource>肖永威</PendingSource>" +
<PendingNote>hl006</PendingNote>" +
</taskXml>
</UpdateTaskStatus>
</SOAP:Body>
</SOAP:Envelope>
其中:
http://10.64.50.143/home/HLJ/unicom/workflow/workflow_wrapper.htm?bizInfoInstanceID=57f16470-0c3b-11e5-f833-e2d1afff1407&taskID=2b7296ce-a8f4-11e5-f835-51f68263dd54
(2)、返回成功标识(Result) <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<header xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/General/1.0/">
<msg-id>f3101653-3fe3-11e5-f865-1e89db965327</msg-id>
</header>
</SOAP:Header>
<SOAP:Body>
<UpdateTaskStatusResponse xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://unicom.com/workflow" preserveSpace="no" qAccess="0" qValues="">
<tuple>
<old>
<updateTaskStatus>
<updateTaskStatus>100-操作成功</updateTaskStatus>
</updateTaskStatus>
</old>
</tuple>
</UpdateTaskStatusResponse>
</SOAP:Body>
</SOAP:Envelope>
3、使用已有向云门户推送待阅消息WebService。
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<UpdateReadingStatus xmlns="http://unicom.com/workflow" preserveSpace="no" qAccess="0" qValues="">
<taskXml>
<ReadingCode>PND_READING_ID</ReadingCode>
<ReadingDate></ReadingDate>
<LastUpdateDate></LastUpdateDate>
<ReadingURL></ReadingURL>
<ReadingStatus>1</ReadingStatus>
<ReadingSourceUserID>xiaoyw3</ReadingSourceUserID>
<ReadingSource>肖永威</ReadingSource>
<ReadingNote>hl006</ReadingNote>
</taskXml>
</UpdateReadingStatus>
</SOAP:Body>
</SOAP:Envelope>
参考: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |