1. Purpose: Due to the many interfaces, the service side changes the interface, will cause the service to deactivate the update, causes the client not to use or the error,
In this evaluation "Web Center" This server side, interface interface parameters increase or decrease, whether the client impact
2. Evaluation content: Add single-value parameter to the service side, reduce the single value parameter of the server, MoD object increment parameter, MoD object to reduce the parameter,
(The JSON data type is not evaluated here because JSON object deserialization is well-scaled and does not affect client callers)
3. PCB Engineering System Integration:
I. Web server add a single value parameter
Pre--- server (one parameter):
/// <SUMMARY> /// test Web interface (single-value parameter) ///< /span> </SUMMARY> /// <param name=" ar1 "></PARAM> /// <RETURNS></RETURNS> public string getinfotest (string ar1 { return $ " getinfotest test {ar1} " ; }
Client invocation (one parameter):
string result = Weborc2_.getinfotest ("1"); // return: getinfotest Test 1
After the change--service side (2 parameters)---Add Parameters:
/// <summary> ///Test Web Interface (single-valued parameter)/// </summary> /// <param name= "ar1" ></param> /// <returns></returns> Public stringGetinfotest (stringAR1,intar2) { return$"getinfotest pass Test {ar1}___{ar2}"; }
The client calls (a parameter)---the client does not update the interface reference:
string result = Weborc2_.getinfotest ("1"); // return: getinfotest parameter Test 1___0
Summary: For the service-side interface to add a single-valued parameter, is not caused by the client call error, the server for increased parameter initialization processing: int initial 0, string initial null
Two. Web server-side reduction of single-value parameters
Before the change--server (2 parameters):
/// <summary> ///Test Web Interface (single-valued parameter)/// </summary> /// <param name= "ar1" ></param> /// <returns></returns> Public stringGetinfotest (stringAR1,intar2) { return$"getinfotest pass Test {ar1}___{ar2}"; }
Client invocation (2 parameters):
string result = Weborc2_.getinfotest ("1",2); // return: getinfotest parameter Test 1___2
After the change--server (one parameter):
/// <SUMMARY> /// test Web interface (single-value parameter) ///
</SUMMARY> /// <param name=" ar1 "></PARAM> /// <RETURNS></RETURNS> public string getinfotest (string AR1) { return $ " getinfotest Test {ar1} " ; }
Client calls (2 parameters)---the client does not update the interface reference:
string result = Weborc2_.getinfotest ("1",2); // return: getinfotest Test 1
Summary: For the service-side interface to reduce the single-value parameter, it will not cause the client call error
Three. Add MoD parameters to Web server
Before the change--server (mod 1 parameters):
/// <summary> ///Test Web Interface (single-valued parameter)/// </summary> /// <param name= "ar1" ></param> /// <returns></returns> Public stringgetinfotest (modtest MoD) {return$"getinfotest pass Test {mod.ar1}"; } Public classModtest { Public stringAR1 {Get;Set; } }
Client call (MoD Class 1 parameters):
New modtest (); " 1 " ; string result = weborc2_.getinfotest (mod_); // return: getinfotest Test 1
After the change--Server (MoD Class 2 parameters)---Add Parameters:
/// <summary> ///Test Web Interface (single-valued parameter)/// </summary> /// <param name= "ar1" ></param> /// <returns></returns> Public stringgetinfotest (modtest MoD) {return$"getinfotest pass Test {mod.ar1}__{mod.ar2}"; } Public classModtest { Public stringAR1 {Get;Set; } Public stringAR2 {Get;Set; } }
Client call (MoD Class 1 parameters)--client does not update interface reference:
New modtest (); " 1 " ; string result = weborc2_.getinfotest (mod_); // return: getinfotest parameter Test 1__
Summary: For the server Interface mod reduced parameters, is not caused by the client call error, the service side for the increased parameter initialization processing: int initial 0, string initial null
Four. Web server side reduce mod parameters
Before the change--server (mod 2 parameters):
/// <summary> ///Test Web Interface (single-valued parameter)/// </summary> /// <param name= "ar1" ></param> /// <returns></returns> Public stringgetinfotest (modtest MoD) {return$"getinfotest pass Test {mod.ar1}__{mod.ar2}"; } Public classModtest { Public stringAR1 {Get;Set; } Public stringAR2 {Get;Set; } }
Client Call (MoD Class 2 parameters):
New modtest (); " 1 " ; " 2 " ; string result = weborc2_.getinfotest (mod_); // return: getinfotest parameter Test 1__2
After the change--Server (MoD Class 1 parameters):
/// <summary> ///Test Web Interface (single-valued parameter)/// </summary> /// <param name= "ar1" ></param> /// <returns></returns> Public stringgetinfotest (modtest MoD) {return$"getinfotest pass Test {mod.ar1}"; } Public classModtest { Public stringAR1 {Get;Set; } }
Client Call (MoD Class 2 parameters)--client does not update interface reference:
New modtest (); " 1 " ; " 2 " ; string result = weborc2_.getinfotest (mod_); // return: getinfotest Test 1
Summary: For the server-side interface MoD class to reduce the parameters, is not caused by the client call error
PCB WCF web interface after adding or subtracting parameters, if the client is not updated, whether the client is affected, the evaluation test