/// <summary> /// This method checks whether a tag exists or not. It is idempotent /// </summary> /// <param name="tag">string of less than 40 characters and without spaces or non-ASCII characters</param> /// <returns><c>true</c> if the tag exists; otherwise <c>false</c>.</returns> /// <exception cref="ArgumentException">If the <paramref name="tag"/> is badly formatted.</exception> /// <exception cref="CritSendException">In case of soap error, contains the message.</exception> public bool IsTag(string tag) { bool result = false; CallWebMethod(delegate(Authentication auth) { result = _client.isTag(auth, tag); }, true); return(result); }
/// <summary> /// Creates a web service client instance. /// </summary> /// <param name="host"></param> /// <returns></returns> private WSDL01forMxMaster CreateClient(string host) { WSDL01forMxMaster client; try { client = new WSDL01forMxMaster { EnableDecompression = true, Url = host + Wsdl }; // If the url does not work an exception is thrown. var auth = GetAuthentication(); client.isTag(auth, "test"); } catch (Exception) { return(null); } return(client); }