soap ws 獲取wsdl中所有方法 (三)

2021-07-14 06:38:51 字數 2079 閱讀 4675

測試方法

@test

public void test2()

測試結果:

[getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro]

getbindingoperations **1123**

[getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro]

getoperationbyurl **35**

false

執行時間上差距很大,原因是第一種方法每次都是新建乙個物件。

static soapoperationbuilder create(soapbuilder builder, binding binding, bindingoperation operation, string soapaction)
第二中方法獲取到的binding節點和獲取porttype節點比較。

@test

public void test03()

測試結果

[getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro]

getallbindingoperation 265

[getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro, getsupportcity, getsupportprovince, getsupportdataset, getweatherbycityname, getweatherbycitynamepro]

getoperationbyurl 39

false

綜上,獲取porttype節點的operation時間最快。生產環境推薦獲取binding節點的資訊。

freebasic獲取目錄中所有檔案

使用函式getdir.其語法如下。function getdir npath as cwstr,lname as win32 find dataw as long 獲取資料夾下所有檔案,包括資料夾 不包含 和 資料夾 npath 要獲取的路徑,要帶萬用字元,如 c lname 返回檔名列表,包括資料...

python 獲取Excel中所有sheets名稱

在這裡不做過多的敘述,用 更為直觀的展示執行過程 第一種方法 獲取檔案的sheep name import pandas as pd sheep name pd.excelfile my.xlsx sheet names sheep name.sheet names print sheet name...

獲取Android手機中所有的簡訊

首先加上讀取資訊的許可權 public string getsmsinphone uri uri uri.parse sms uri all cursor cur cr.query uri,projection,null,null,date desc if cur.movetofirst else ...