發表文章

目前顯示的是 9月, 2018的文章

POSTMAN 測試 WCF 服務

新增 WCF 服務應用程式,本測試專案使用 .NET Framework 4.6.1 。 建好 WcfService1 後,啟動並開啟 POSTMAN。 HTTP METHOD 改成 POST ,網址欄輸入http://IP/WcfService1/Service1.svc?wsdl Headers 輸入: [{"key":"soapAction","value":"http://tempuri.org/IService1/GetData","description":""},{"key":"Content-Type","value":"text/xml","description":""}] BODY 輸入: <s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:body> <getdata xmlns="http://tempuri.org/"> <value>5</value> </getdata> </s:body> </s:envelope> 點選 SEND ,得到正確數值,完成測試。 <s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:body> <getdataresponse xmlns="http://tempuri.org/"> <getdataresult>You entered: 5</getdataresult></getdataresponse></s:body></s:enve