Home > database > Webservice repeatedly call release and server resources performance
Webservice repeatedly call release and server resources performance
Time:10-10
Repeated calls a function in the form, function is used to invoke a web service interface, this function is placed in a custom class, The SoapConnection lsc_con Webserviceterminalcallsoap lws_tcall Long llVar String ls_result
Lsc_con=create the SoapConnection; LlVar=lsc_con. CreateInstance (lws_tcall, "webservicetest") Tns__struct lstr_tns_struct
Lstr_tns_struct. Info=info Lstr_tns_struct. Macs=macs Try Ls_result=lws_tcall. Call (info, macs) //Invoke service The catch (SoapException e) Messagebox (" Err ", "always invoke a Web service") //error handling for End the try
If ls_result='Call Success then Return 0 The else Return 1 End the if
Destroy lsc_con So every time lsc_con and create will not lead to resources takes up too much, this will not lead to webservice server-side resource utilization is low, performance is affected, is it possible that a definition and create, repeated use of the good points,
CodePudding user response:
Recommend the use of PFW there httpclient object to invoke the HTTP HTTPS webservice sure there are a bunch of kit