Freigeben über


ContractReference.Ref Eigenschaft

Definition

Ruft die URL für die Dienstbeschreibung ab, auf die verwiesen wird, oder legt diese fest.

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

Eigenschaftswert

Die URL für die Dienstbeschreibung, auf die verwiesen wird.

Beispiele

Im folgenden Codebeispiel wird die Ref -Eigenschaft eines ContractReferencefestgelegt.

// 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 );
// 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);
' 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)

Hinweise

In einem Ermittlungsdokument ist ein Verweis auf eine Dienstbeschreibung in einem contractRef XML-Element enthalten. Das contractRef XML-Element verfügt über zwei Attribute, die in der folgenden Tabelle beschrieben werden.

attribute BESCHREIBUNG
ref Die URL für die Dienstbeschreibung. Die Ref -Eigenschaft stellt den Wert des ref Attributs dar.
docRef Die URL für einen XML-Webdienst, der die durch das ref -Attribut angegebene Dienstbeschreibung implementiert. Die DocRef -Eigenschaft stellt den Wert des docRef Attributs dar.

Gilt für:

Weitere Informationen