Пример #1
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 ();
		}
Пример #2
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();
        }
Пример #3
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();
        }
Пример #4
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;
            }
        }
Пример #5
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 ();
		}
Пример #6
0
		public void InitializePortTypeCollection ()
		{
			// workaround for internal constructor
			ServiceDescription desc = new ServiceDescription ();
			ptc = desc.PortTypes;
		}