private static void RemovePolicyFormatFromBinding(BindingCollection bindings)
 {
     foreach (Binding binding in bindings)
     {
         foreach (OperationBinding opBinding in binding.Operations)
         {
             RemovePolicyFormatFromExtensions(opBinding.Extensions);
         }
     }
 }
Esempio n. 2
0
        private static bool IsBindingNameUsed(string name, object collection)
        {
            WsdlNS.BindingCollection bindings = (WsdlNS.BindingCollection)collection;
            foreach (WsdlNS.Binding binding in bindings)
            {
                if (binding.Name == name)
                {
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 3
0
		public ServiceDescription ()
		{
			bindings = new BindingCollection (this);
			extensions = new ServiceDescriptionFormatExtensionCollection (this);
			imports = new ImportCollection (this);
			messages = new MessageCollection (this);
			portTypes = new PortTypeCollection (this);

			serviceDescriptions = null;
			services = new ServiceCollection (this);
			targetNamespace = null;
			types = new Types ();
		}
Esempio n. 4
0
        public ServiceDescription()
        {
            bindings   = new BindingCollection(this);
            extensions = new ServiceDescriptionFormatExtensionCollection(this);
            imports    = new ImportCollection(this);
            messages   = new MessageCollection(this);
            portTypes  = new PortTypeCollection(this);

            serviceDescriptions = null;
            services            = new ServiceCollection(this);
            targetNamespace     = null;
            types = new Types();
        }
        public override void Check(ConformanceCheckContext ctx, BindingCollection value)
        {
            foreach (Binding b in value)
            {
                foreach (object ext in b.Extensions)
                {
                    if (ext.GetType() == typeof(SoapBinding))
                    {
                        return;
                    }
                }
            }

            ctx.ReportRuleViolation(value, BasicProfileRules.R2401);
        }
Esempio n. 6
0
        public ServiceDescription()
        {
            bindings   = new BindingCollection(this);
            extensions = new ServiceDescriptionFormatExtensionCollection(this);
            imports    = new ImportCollection(this);
            messages   = new MessageCollection(this);
#if !NET_2_0
//			name = String.Empty;
#endif
            portTypes = new PortTypeCollection(this);

            serviceDescriptions = null;
            services            = new ServiceCollection(this);
            targetNamespace     = null;
            types = new Types();
        }
Esempio n. 7
0
        public Parser(WSDescriber wsDesc, ref bool untrustedSSLSecureChannel, ref List<Param> respHeader)
        {
            HttpWebRequest wr = GetHttpWebReq(wsDesc);

            HttpWebResponse wres = null;
            try
            {
                wres = (HttpWebResponse)wr.GetResponse();
            }
            catch (WebException wex)
            {
                if (wex.Status == WebExceptionStatus.TrustFailure)
                {
                    ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

                    wr = GetHttpWebReq(wsDesc);
                    wres = (HttpWebResponse)wr.GetResponse();

                    untrustedSSLSecureChannel = true;
                }
            }

            if (wres != null)
            {
                for (int i = 0; i < wres.Headers.Count; ++i)
                {
                    respHeader.Add(new Param() { Name = wres.Headers.Keys[i].ToLowerInvariant(), Value = wres.Headers[i].ToLowerInvariant() });
                }

                StreamReader streamReader = new StreamReader(wres.GetResponseStream());

                rawWSDL = XDocument.Parse(streamReader.ReadToEnd());

                TextReader myTextReader = new StringReader(rawWSDL.ToString());
                serviceDescription = ServiceDescription.Read(myTextReader);

                TargetNameSpace = serviceDescription.TargetNamespace;
                bindColl = serviceDescription.Bindings;
                portTypColl = serviceDescription.PortTypes;
                msgColl = serviceDescription.Messages;
                types = serviceDescription.Types;
                schemas = types.Schemas;
            }
        }
Esempio n. 8
0
		public ServiceDescription ()
		{
			bindings = new BindingCollection (this);
			extensions = new ServiceDescriptionFormatExtensionCollection (this);
			imports = new ImportCollection (this);
			messages = new MessageCollection (this);
#if !NET_2_0
//			name = String.Empty;		
#endif
			portTypes = new PortTypeCollection (this);

			serviceDescriptions = null;
			services = new ServiceCollection (this);
			targetNamespace = null;
			types = new Types ();
		}
Esempio n. 9
0
		public void InitializeBindingCollection ()
		{
			// workaround for internal constructor
			ServiceDescription desc = new ServiceDescription ();
			bc = desc.Bindings;
		}
Esempio n. 10
0
 public virtual void Check(ConformanceCheckContext ctx, BindingCollection value)
 {
 }
Esempio n. 11
0
		public override void Check (ConformanceCheckContext ctx, BindingCollection value) {
			foreach (Binding b in value)
				foreach (object ext in b.Extensions)
					if (ext.GetType () == typeof (SoapBinding))
						return;

			ctx.ReportRuleViolation (value, BasicProfileRules.R2401);
		}
Esempio n. 12
0
		public virtual void Check (ConformanceCheckContext ctx, BindingCollection value) { }