This documentation is archived and is not being maintained.
ContractReference::Namespace Field
Visual Studio 2008
XML namespace for service description references in discovery documents.
Assembly: System.Web.Services (in System.Web.Services.dll)
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 );
// Call the Constructor of ContractReference.
ContractReference* myContractReference = new ContractReference();
XmlDocument* myXmlDocument = new XmlDocument();
// Read the discovery document for the 'contractRef' tag.
myXmlDocument -> Load(S"http://localhost/Discoverydoc.disco");
XmlNode * myXmlRoot = myXmlDocument -> FirstChild;
XmlNode * myXmlNode = myXmlRoot->Item[S"scl:contractRef"];
XmlAttributeCollection * myAttributeCollection = myXmlNode -> Attributes;
myContractReference->Ref = myAttributeCollection->ItemOf[0]->Value;
Console::WriteLine(S"The URL to the referenced service description is : {0}", myContractReference -> Ref);
myContractReference -> DocRef = myAttributeCollection->ItemOf[1]->Value;
Console::WriteLine(S"The URL implementing the referenced service description is : {0}", myContractReference -> DocRef);
Console::WriteLine(S"Namespace for the referenced service description is : {0}", ContractReference::Namespace);
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: