ContractReference.Namespace Field
.NET Framework (current version)
XML namespace for service description references in discovery documents.
Assembly: System.Web.Services (in System.Web.Services.dll)
Within a discovery document, a reference to a Service Description is contained within a contractRef XML element, which is a part of the XML namespace specified in the Namespace constant.
The following code example outputs to the console the value of the Namespace constant.
' Call the Constructor of ContractReference. Dim myContractReference As New ContractReference() Dim myXmlDocument As New XmlDocument() ' Read the discovery document for the 'contractRef' tag. myXmlDocument.Load("http://localhost/Discoverydoc.disco") Dim myXmlRoot As XmlNode = myXmlDocument.FirstChild Dim myXmlNode As XmlNode = myXmlRoot("scl:contractRef") Dim myAttributeCollection As XmlAttributeCollection = myXmlNode.Attributes myContractReference.Ref = myAttributeCollection(0).Value Console.WriteLine("The URL to the referenced service description is : {0}", myContractReference.Ref) myContractReference.DocRef = myAttributeCollection(1).Value Console.WriteLine("The URL implementing the referenced service description is : {0}", myContractReference.DocRef) Console.WriteLine("Namespace for the referenced service description is : {0}", ContractReference.Namespace)
.NET Framework
Available since 1.1
Available since 1.1
Show: