다음을 통해 공유


ContractReference.DocRef 속성

정의

Ref 속성에 참조된 서비스 설명을 구현하는 XML Web services에 대한 URL을 가져오거나 설정합니다.

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

속성 값

String

Ref 속성에 참조된 서비스 설명을 구현하는 XML Web services에 대한 URL입니다.

예제

다음 코드 예제에서는 .의 DocRef 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)

설명

검색 문서 내에서 서비스 설명에 대한 참조는 XML 요소 내에 contractRef 포함됩니다. contractRef XML 요소에는 다음 표에 설명된 두 가지 특성이 있습니다.

attribute Description
ref 서비스 설명의 URL입니다. 속성은 Ref 특성의 ref 값을 나타냅니다.
docRef 특성에 지정된 ref 서비스 설명을 구현하는 XML 웹 서비스의 URL입니다. 속성은 DocRef 특성의 docRef 값을 나타냅니다.

적용 대상

추가 정보