//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.17929
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.17929.
// 
#pragma warning disable 1591

namespace RadiologyResultSampleCodeCS.RadiologyResultsWebService {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="RadiologyResultServicePort", Namespace="http://medplus.com/radiology/result")]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(ResponseProperty))]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(BaseHubServiceResponse))]
    public partial class RadiologyResultService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback submitRadiologyResultOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public RadiologyResultService() {
            this.Url = global::RadiologyResultSampleCodeCS.Properties.Settings.Default.RadiologyResultSampleCode_localhost_RadiologyResultService;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event submitRadiologyResultCompletedEventHandler submitRadiologyResultCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://medplus.com/radiology/result", ResponseNamespace="http://medplus.com/radiology/result")]
        [return: System.Xml.Serialization.SoapElementAttribute("result")]
        public RadiologyResultResponse submitRadiologyResult(RadiologyResult radiologyResult) {
            object[] results = this.Invoke("submitRadiologyResult", new object[] {
                        radiologyResult});
            return ((RadiologyResultResponse)(results[0]));
        }
        
        /// <remarks/>
        public void submitRadiologyResultAsync(RadiologyResult radiologyResult) {
            this.submitRadiologyResultAsync(radiologyResult, null);
        }
        
        /// <remarks/>
        public void submitRadiologyResultAsync(RadiologyResult radiologyResult, object userState) {
            if ((this.submitRadiologyResultOperationCompleted == null)) {
                this.submitRadiologyResultOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsubmitRadiologyResultOperationCompleted);
            }
            this.InvokeAsync("submitRadiologyResult", new object[] {
                        radiologyResult}, this.submitRadiologyResultOperationCompleted, userState);
        }
        
        private void OnsubmitRadiologyResultOperationCompleted(object arg) {
            if ((this.submitRadiologyResultCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.submitRadiologyResultCompleted(this, new submitRadiologyResultCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.radiology.webservice")]
    public partial class RadiologyResult {
        
        private byte[] hl7RadiologyResultField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(DataType="base64Binary", IsNullable=true)]
        public byte[] hl7RadiologyResult {
            get {
                return this.hl7RadiologyResultField;
            }
            set {
                this.hl7RadiologyResultField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.framework.webservices")]
    public partial class ResponseProperty {
        
        private string propertyNameField;
        
        private string propertyValueField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string propertyName {
            get {
                return this.propertyNameField;
            }
            set {
                this.propertyNameField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string propertyValue {
            get {
                return this.propertyValueField;
            }
            set {
                this.propertyValueField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(RadiologyResultResponse))]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.framework.webservices")]
    public partial class BaseHubServiceResponse {
        
        private string responseCodeField;
        
        private string responseMsgField;
        
        private ResponseProperty[] responsePropertiesField;
        
        private string statusField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string responseCode {
            get {
                return this.responseCodeField;
            }
            set {
                this.responseCodeField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string responseMsg {
            get {
                return this.responseMsgField;
            }
            set {
                this.responseMsgField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public ResponseProperty[] responseProperties {
            get {
                return this.responsePropertiesField;
            }
            set {
                this.responsePropertiesField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string status {
            get {
                return this.statusField;
            }
            set {
                this.statusField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.radiology.webservice")]
    public partial class RadiologyResultResponse : BaseHubServiceResponse {
        
        private string messageControlIdField;
        
        private string[] validationErrorsField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string messageControlId {
            get {
                return this.messageControlIdField;
            }
            set {
                this.messageControlIdField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string[] validationErrors {
            get {
                return this.validationErrorsField;
            }
            set {
                this.validationErrorsField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    public delegate void submitRadiologyResultCompletedEventHandler(object sender, submitRadiologyResultCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class submitRadiologyResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal submitRadiologyResultCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public RadiologyResultResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((RadiologyResultResponse)(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591