IBM WMB 使用方法

2021-08-27 18:04:42 字數 2293 閱讀 8433

第一部分; webservice 呼叫 webservice
注意:webservice一般傳來的是字串(具體情況要看debug中的資料數值)

一般佇列傳過來的xml訊息不需要轉化成邏輯樹(row格式)

broker schema gen

create compute module funmain_request_response_call_his_zzyy

create function main() returns boolean

begin

–將msgid賦值給correlid,environment邏輯樹主要用於儲存配置資訊

set environment.mqmd.correlid=inputroot.mqmd.msgid;

set environment.encoding = inputroot.properties.encoding;

set environment.codedcharsetid = inputroot.properties.codedcharsetid;

–命名空間在與區別相同的結構

–獲得message邏輯樹中inputroot.xmlnsc.ns:funmain.input中的節點的值為傳入佇列或者傳入webservice的多有資料

declare inputstring char inputroot.xmlnsc.ns:funmain.input;

–將輸入string轉成xml邏輯樹才能指定節點賦值,不然就是整體乙個字串怎麼指定位元組

–具體順序是 傳進來的是inputstring(char)然後轉換成subbitstream(blob)最後轉化成myrow(row)如下:

declare subbitstream blob;

declare myrow row;

set subbitstream = cast(inputstring as blob ccsid 1208);

create lastchild of myrow domain (『xmlnsc』)

parse(subbitstream,environment.encoding,environment.codedcharsetid);

–通過fid來判斷服務並呼叫相應的webservice

declare who char myrow.xmlnsc.esbentry.messageheader.fid;

–並且把呼叫的webservice所需的字串賦值

declare wholemsgchar char myrow.xmlnsc.esbentry.msginfo.msg;

if who = 『ms02004』 then

set outputroot.xmlnsc.ws:querypatientinfoxml.ws:strxml = wholemsgchar;

elseif who = 『ms02005』 then

set outputroot.xmlnsc.ws:getdeptlistxml.ws:strxml = wholemsgchar;

elseif who = 『ms02006』 then

set outputroot.xmlnsc.ws:getdoctorlistxml.ws:strxml = wholemsgchar;

elseif who = 『bs10035』 then

set outputroot.xmlnsc.ws:reservexml.ws:strxml = wholemsgchar;

elseif who = 『bs10038』 then

set outputroot.xmlnsc.ws:getticketlistxml.ws:strxml = wholemsgchar;

elseif who = 『bs10036』 then

set outputroot.xmlnsc.ws:cancelreservexml.ws:strxml = wholemsgchar;

elseif who = 『bs10037』 then

set outputroot.xmlnsc.ws:getreservehistoryxml.ws:strxml = wholemsgchar;

end if;

–結束並輸出到out節點(終端)

propagate to terminal 『out』;

return false;

end;

pythonpip使用方法 pip使用方法整理

匯出專案已安裝的pip包 pip list 檢視專案中安裝的包 pip freeze requirements.txt 將專案中所用到的第三方庫輸出到requirements.txt中 pip install 版本號 pip install i 本次使用清華源進行安裝 離線安裝第三方庫 一鍵安裝整個...

使用方法 離型劑使用方法

1 使用離型劑前必須確保模具乾淨,無粉塵 蠟垢 樹脂垢 油汙等殘留物質。可以使用專用的模具潔模劑進行清洗,不可用其他液體清洗,以免清洗不乾淨或損壞模具。另外,如果您的模具是新的,在清洗乾淨後,務必要對模具進行初步處理,用離型劑在模具表面噴 刷塗5 6次,之後方可正常投入生產。2 使用離型劑時,首先要...

使用方法 卡丁車輪胎使用方法

輪胎的使用方法很重要 卡丁車輪胎是卡丁車場日常執行中的主要易損件,但是輪胎的使用方法很重要。哪些情況下會縮短輪胎的使用壽命呢?一 跑道地面粗糙 有的跑道在鋪瀝青時,或者選錯了瀝青中石子的規格,或者碾壓得不夠平整,導致路面粗糙。有的跑道使用現成的水泥地,但表面粗糙或不平整。有的室內跑道,為了提高輪胎的...