// // System.Web.Services.Description.ServiceDescription.cs // // Author: // Tim Coleman (tim@timcoleman.com) // // Copyright (C) Tim Coleman, 2002 // using System.IO; using System.Web.Services; using System.Web.Services.Configuration; using System.Xml; using System.Xml.Serialization; namespace System.Web.Services.Description { [XmlFormatExtensionPoint ("Extensions")] [XmlRoot ("definitions", Namespace = "http://schemas.xmlsoap.org/wsdl/")] public sealed class ServiceDescription : DocumentableItem { #region Fields public const string Namespace = "http://schemas.xmlsoap.org/wsdl/"; BindingCollection bindings; ServiceDescriptionFormatExtensionCollection extensions; ImportCollection imports; MessageCollection messages; string name; PortTypeCollection portTypes; string retrievalUrl; XmlSerializer serializer; ServiceDescriptionCollection serviceDescriptions; ServiceCollection services; string targetNamespace; Types types; #endregion // Fields #region Constructors public ServiceDescription () { bindings = new BindingCollection (this); extensions = new ServiceDescriptionFormatExtensionCollection (this); imports = new ImportCollection (this); messages = new MessageCollection (this); name = String.Empty; portTypes = new PortTypeCollection (this); retrievalUrl = String.Empty; serializer = null; serviceDescriptions = null; services = new ServiceCollection (this); targetNamespace = String.Empty; types = null; } #endregion // Constructors #region Properties [XmlElement ("binding")] public BindingCollection Bindings { get { return bindings; } } [XmlIgnore] public ServiceDescriptionFormatExtensionCollection Extensions { get { return extensions; } } [XmlElement ("import")] public ImportCollection Imports { get { return imports; } } [XmlElement ("message")] public MessageCollection Messages { get { return messages; } } [XmlAttribute ("name", DataType = "NMTOKEN")] public string Name { get { return name; } set { name = value; } } [XmlElement ("portType")] public PortTypeCollection PortTypes { get { return portTypes; } } [XmlIgnore] public string RetrievalUrl { get { return retrievalUrl; } set { retrievalUrl = value; } } [XmlIgnore] public static XmlSerializer Serializer { [MonoTODO] get { throw new NotImplementedException (); } } [XmlIgnore] public ServiceDescriptionCollection ServiceDescriptions { get { if (serviceDescriptions == null) throw new NullReferenceException (); return serviceDescriptions; } } [XmlElement ("service")] public ServiceCollection Services { get { return services; } } [XmlAttribute ("targetNamespace")] public string TargetNamespace { get { return targetNamespace; } set { targetNamespace = value; } } [XmlElement ("type")] public Types Types { get { return types; } set { types = value; } } #endregion // Properties #region Methods [MonoTODO] public static bool CanRead (XmlReader reader) { throw new NotImplementedException (); } [MonoTODO] public static ServiceDescription Read (Stream stream) { throw new NotImplementedException (); } [MonoTODO] public static ServiceDescription Read (string fileName) { throw new NotImplementedException (); } [MonoTODO] public static ServiceDescription Read (TextReader textReader) { throw new NotImplementedException (); } [MonoTODO] public static ServiceDescription Read (XmlReader reader) { throw new NotImplementedException (); } [MonoTODO] public void Write (Stream stream) { throw new NotImplementedException (); } [MonoTODO] public void Write (string fileName) { throw new NotImplementedException (); } [MonoTODO] public void Write (TextWriter writer) { throw new NotImplementedException (); } [MonoTODO] public void Write (XmlWriter writer) { throw new NotImplementedException (); } internal void SetParent (ServiceDescriptionCollection serviceDescriptions) { this.serviceDescriptions = serviceDescriptions; } #endregion } }