Transmitter5PingString Method |
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 PingString(
string appVersion,
string monitoringID,
out string serverTime,
int lcid
)
Public Sub PingString (
appVersion As String,
monitoringID As String,
<OutAttribute> ByRef serverTime As String,
lcid As Integer
)
public:
virtual void PingString(
String^ appVersion,
String^ monitoringID,
[OutAttribute] String^% serverTime,
int lcid
) sealed
function PingString(appVersion, monitoringID, serverTime, lcid);
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 String
- Contains the server's time upon return from the call. Formatting depends on the lcid.
- lcid Int32
- The locale identifier (see http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx) that tells the transmitter how to convert to/from date/time string representation. Use 1033 (hexadecimal 0x409) for US-English convention, 4108 for fr-CH, 2064 for it-CH and 2055 for de-CH. If you pass 0 the conversion will be made according to the current culture.
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();
string serverTime;
tx.PingString(appVersion, monitoringID, out serverTime, 4108);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also