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. ContractReference^ myContractReference = gcnew ContractReference; XmlDocument^ myXmlDocument = gcnew XmlDocument; // Read the discovery document for the 'contractRef' tag. myXmlDocument->Load( "http://localhost/Discoverydoc.disco" ); XmlNode^ myXmlRoot = myXmlDocument->FirstChild; XmlNode^ myXmlNode = myXmlRoot[ "scl:contractRef" ]; XmlAttributeCollection^ myAttributeCollection = 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: