ContractReference.Ref Property

 

Gets or sets the URL to the referenced service description.

Namespace:   System.Web.Services.Discovery
Assembly:  System.Web.Services (in System.Web.Services.dll)

Public Property Ref As String

Property Value

Type: System.String

The URL to the referenced service description.

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.
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)

.NET Framework
Available since 1.1
Return to top
Show: