Share via


ContractReference.DocRef Propriété

Définition

Obtient ou définit l’URL d’un service web XML implémentant la description du service référencée dans la propriété Ref.

public:
 property System::String ^ DocRef { System::String ^ get(); void set(System::String ^ value); };
public string DocRef { get; set; }
member this.DocRef : string with get, set
Public Property DocRef As String

Valeur de propriété

String

Obtient et définit l'URL d'un service Web XM implémentant la description du service référencée dans la propriété Ref.

Exemples

L’exemple de code suivant définit la DocRef propriété de 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 );
myContractReference->DocRef = myAttributeCollection[ 1 ]->Value;
Console::WriteLine( "The URL implementing the referenced service description is : {0}", myContractReference->DocRef );
// Call the Constructor of ContractReference.
ContractReference myContractReference = new ContractReference();
XmlDocument myXmlDocument = new 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);
' 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)

Remarques

Dans un document de découverte, une référence à une description de service est contenue dans un contractRef élément XML. L’élément contractRef XML comporte deux attributs décrits dans le tableau suivant.

Attribut Description
ref URL de la description du service. La Ref propriété représente la valeur de l’attribut ref .
docRef URL d’un service Web XML implémentant la description du service spécifiée par l’attribut ref . La DocRef propriété représente la valeur de l’attribut docRef .

S’applique à

Voir aussi