ContractReference.Url Property

 

Gets or sets the URL for the referenced Service Description.

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

Public Overrides Property Url As String

Property Value

Type: System.String

The URL for the referenced service description.

For the ContractReference class, the Url property returns the value of the Ref property.

Dim myProtocol As New DiscoveryClientProtocol()

' Get the DiscoveryDocument.
Dim myDiscoveryDocument As DiscoveryDocument = _
    myProtocol.Discover("http://localhost/ContractReference/Test_vb.disco")
Dim myArrayList As ArrayList = _
    CType(myDiscoveryDocument.References, ArrayList)

' Get the ContractReference.
Dim myContractRefrence As ContractReference = _
    CType(myArrayList(0), ContractReference)

' Get the DefaultFileName associated with the .disco file.
Dim myFileName As String  = myContractRefrence.DefaultFilename

' Get the URL associated with the .disco file.
Dim myUrl As String  = myContractRefrence.Url
Console.WriteLine("The DefaulFilename is: " + myUrl)
Console.WriteLine("The URL is: " + myUrl)

.NET Framework
Available since 1.1
Return to top
Show: