Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).
Namespace: SwissDecTXAssembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntaxpublic void Ping(
string appVersion,
string monitoringID,
out DateTime serverTime
)
Public Sub Ping (
appVersion As String,
monitoringID As String,
<OutAttribute> ByRef serverTime As DateTime
)
public:
virtual void Ping(
String^ appVersion,
String^ monitoringID,
[OutAttribute] DateTime% serverTime
) sealed
function Ping(appVersion, monitoringID, serverTime);
Parameters
- appVersion String
- UserAgent/Version as it appears in your declarations.
- monitoringID String
- Your monitoring ID. Contact SwissDec to obtain your own private monitoring ID. You can use "monitoringID" or "tester" as a generic ID of you don't have your own yet.
- serverTime DateTime
- Contains the server's time upon return from the call.
RemarksThis method will throw an exception in case an error occurs, or if the echoed string does not match the sent string.
ExampleCalling Transmitter.Ping()
using SwissDecTX;
try {
var tx = new Transmitter5();
DateTime serverTime;
tx.Ping(appVersion, monitoringID, out serverTime);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also