ContractReference::Ref Property
Gets or sets the URL to the referenced service description.
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. The contractRef XML element has two attributes described in the following table.
Attribute | Description |
|---|---|
ref | The URL for the service description.The Ref property represents the value of the ref attribute. |
docRef | The URL for a XML Web service implementing the service description specified by the ref attribute. The DocRef property represents the value of the docRef attribute. |
The following code example sets the Ref property of a ContractReference.
// 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 );
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.