1、了解WebService(文末:webservice的發布調用的源碼)
Web Service是一個平臺獨立的,低耦合的,自包含的、基於可編程的web的應用程式,可使用開放的XML(標準通用標記語言下的一個子集)標準來描述、發布、發現、協調和配置這些應用程式,用於開發分布式的交互操作的應用程式。
lizi
代碼解釋:
演示的配置:
開發工具IDEA 實現語言Java (SpringBoot框架)演示資料庫MongoDB調試工具1、webservice配置
2、WebService發布接口類
2、實現WebService接口類方法(按照自己需求制定相應方法)
3、WebService方法調用測試
測試結果:
Project Name: TodayInfoService
Initial WSDL: http://localhost:9999/services/TodayInfoService?wsd
1、患者主索引 v_jheis_patient_index
方法名:getPatient
請求格式:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.lli.com/">
<soapenv:Header/>
<soapenv:Body>
<web:getPatient>
<!--Optional:-->
<param>參數(String)</param> //這裡是參數,此參數為患者的住院號
</web:getPatient>
</soapenv:Body>
</soapenv:Envelope>
內容響應:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getPatientResponse xmlns:ns2="http://webservice.lli.com/">
<return>患者信息</return>
</ns2:getPatientResponse>
</soap:Body>
</soap:Envelope>
2、患者評測明細 v_jheis_evaluation_items
方法名:getEvaluation
請求格式:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.lli.com/">
<soapenv:Header/>
<soapenv:Body>
<web:getEvaluation>
<!--Optional:-->
<id>參數1(String)</id> //此參數未患者的門診號
<!--Optional:-->
<STime>參數2(String)</STime>//此參數為開始時間查詢
<!--Optional:-->
<ETime>參數3(String)</ETime>//此參數為結束時間查詢
</web:getEvaluation>
</soapenv:Body>
</soapenv:Envelope>
內容響應:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getEvaluationResponse xmlns:ns2="http://webservice.lli.com/">
<return>
<![CDATA[<evaluation>
<ETIME>2020-11-03 22:25:00</ETIME> //記錄的結束時間
<INP_NO>P12345</INP_NO> //住院號
<PATIENT_ID>0000930055</PATIENT_ID> //查詢的患者門診號
<STIME>2020-11-03 22:25:00</STIME> //記錄的開始時間
<VISIT_ID>1</VISIT_ID> //患者住院次數
//以下是參數值
<vitalSigns>
<paramCode>wcssy</paramCode>
<paramName>無創收縮</paramName>
<paramUnit></paramUnit>
<pid>5fa150c0fc21d77f20d20a3e</pid>
<time>Tue Nov 03 22:25:00 CST 2020</time>
<value>105</value>
<_class>today.operation.entity.VitalSigns</_class>
<_id>5fa1668ffc21d77f20c51b57</_id>
</vitalSigns>
</evaluation>]]>
</return>
</ns2:getEvaluationResponse>
</soap:Body>
</soap:Envelope>
WebService源碼:
https://chenqiwei.lanzoux.com/iuKRQiv2r7a