SoapDiscoveryLink Class
Represents a link to the site that contains the SOAP definitions and WSDL.
System.Object
System.Web.UI.Control
Microsoft.SharePoint.WebControls.SPControl
Microsoft.SharePoint.WebControls.SoapDiscoveryLink
System.Web.UI.Control
Microsoft.SharePoint.WebControls.SPControl
Microsoft.SharePoint.WebControls.SoapDiscoveryLink
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
SoapDiscoveryLink
Description
The Microsoft.SharePoint.WebControls.SoapDiscoveryLink class inherits from the Microsoft.SharePoint.WebControls.SPControl which acts as a base server control within SharePoint. The SoapDiscoveryLink web control writes to standard output the definite path to a sites .disco file within a literal LINK element with the TYPE attribute set to an XML media type. This .disco file is used to identify and characterize the SharePoint site web services, significant to sustain client web services discovery.
SoapDiscoveryLink will employ a SPWebService object which contains applicable administration information for interacting with the SharePoint web services. One of the properties off a SPWebService object is SPWebService.DiscoPage which will return a string representation of the .disco page name. This is concatenated into a full string representation for the complete URL to the .disco file, taking into account required encoding.
The Usage Scenario
The main usage for SoapDiscoveryLink is represented on SharePoint master pages since it is generally not instance based, but rather a globally used control. The tag will take on the form:<SharePoint:SoapDiscoveryLink runat="server" />
As SoapDiscoveryLink is a web control you can use it like any conventional server control within a custom WebPart. The only real rationale to do so would be if this control wasn’t sponsored by a secondary source, like in the above when it is afforded through the master page. In the below I am creating a new instance of SoapDiscoveryLink and adding it the current control collection.
C# Code Example
protected override void CreateChildControls()
{
SoapDiscoveryLink link = new SoapDiscoveryLink();
link.ID = "SoapLink";
Controls.Add(link);
base.CreateChildControls();
}
Visual Basic .NET Code Example
Protected Overloads Overrides Sub CreateChildControls()
Dim link As New SoapDiscoveryLink()
link.ID = "SoapLink"
Controls.Add(link)
MyBase.CreateChildControls()
End Sub
The Microsoft.SharePoint.WebControls.SoapDiscoveryLink class inherits from the Microsoft.SharePoint.WebControls.SPControl which acts as a base server control within SharePoint. The SoapDiscoveryLink web control writes to standard output the definite path to a sites .disco file within a literal LINK element with the TYPE attribute set to an XML media type. This .disco file is used to identify and characterize the SharePoint site web services, significant to sustain client web services discovery.
SoapDiscoveryLink will employ a SPWebService object which contains applicable administration information for interacting with the SharePoint web services. One of the properties off a SPWebService object is SPWebService.DiscoPage which will return a string representation of the .disco page name. This is concatenated into a full string representation for the complete URL to the .disco file, taking into account required encoding.
The Usage Scenario
The main usage for SoapDiscoveryLink is represented on SharePoint master pages since it is generally not instance based, but rather a globally used control. The tag will take on the form:<SharePoint:SoapDiscoveryLink runat="server" />
As SoapDiscoveryLink is a web control you can use it like any conventional server control within a custom WebPart. The only real rationale to do so would be if this control wasn’t sponsored by a secondary source, like in the above when it is afforded through the master page. In the below I am creating a new instance of SoapDiscoveryLink and adding it the current control collection.
C# Code Example
protected override void CreateChildControls()
{
SoapDiscoveryLink link = new SoapDiscoveryLink();
link.ID = "SoapLink";
Controls.Add(link);
base.CreateChildControls();
}
Visual Basic .NET Code Example
Protected Overloads Overrides Sub CreateChildControls()
Dim link As New SoapDiscoveryLink()
link.ID = "SoapLink"
Controls.Add(link)
MyBase.CreateChildControls()
End Sub
- 6/3/2010
- Adam Buenz - MVP