/// <summary> /// Create an accessor for the specified WITSML server. /// </summary> /// <param name="url">URL to server. Non-null.</param> /// <param name="userName">User name for server login. Non-null.</param> /// <param name="password">Password for server login. Non-null.</param> /// <param name="clientCapabilitiesXml"></param> internal WitsmlStoreAccessor(string url, String userName, String password, String clientCapabilitiesXml) { if (url == null) { throw new ArgumentNullException("url cannot be null"); } if (userName == null) { throw new ArgumentNullException("userName cannot be null"); } if (password == null) { throw new ArgumentNullException("password cannot be null"); } if (clientCapabilitiesXml == null) { throw new ArgumentNullException("clientCapabilitiesXml cannot be null"); } cachedEndpoint = url; cachedUsername = userName; cachedPassword = password; cachedTimeout = DEFAULT_TIMEOUT; this.clientCapabilitiesXml = clientCapabilitiesXml; service = new WMLS131.WMLS(); service.Url = cachedEndpoint; service.Timeout = cachedTimeout; service.Credentials = new NetworkCredential(cachedUsername, cachedPassword); //setPortName("StoreSoapPort"); }
/// <summary> /// Create an accessor for the specified WITSML server. /// </summary> /// <param name="url">URL to server. Non-null.</param> /// <param name="userName">User name for server login. Non-null.</param> /// <param name="password">Password for server login. Non-null.</param> /// <param name="clientCapabilitiesXml"></param> internal WitsmlStoreAccessor(string url, String userName, String password, String clientCapabilitiesXml) { if (url == null) throw new ArgumentNullException("url cannot be null"); if (userName == null) throw new ArgumentNullException("userName cannot be null"); if (password == null) throw new ArgumentNullException("password cannot be null"); if (clientCapabilitiesXml == null) throw new ArgumentNullException("clientCapabilitiesXml cannot be null"); cachedEndpoint = url; cachedUsername = userName; cachedPassword = password; cachedTimeout = DEFAULT_TIMEOUT; this.clientCapabilitiesXml = clientCapabilitiesXml; service = new WMLS131.WMLS(); service.Url = cachedEndpoint; service.Timeout = cachedTimeout; service.Credentials = new NetworkCredential(cachedUsername, cachedPassword); //setPortName("StoreSoapPort"); }