VCFilter.AddWebReference(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a reference to a Web service to the filter. A new Web service reference subfolder is added to the Web References folder of the project. This new folder contains several other project items related to the Web service. The method returns the ProjectItem object associated with the new Web service folder.
public:
System::Object ^ AddWebReference(System::String ^ bstrUrl, System::String ^ bstrName);
public:
Platform::Object ^ AddWebReference(Platform::String ^ bstrUrl, Platform::String ^ bstrName);
winrt::Windows::Foundation::IInspectable AddWebReference(std::wstring const & bstrUrl, std::wstring const & bstrName);
[System.Runtime.InteropServices.DispId(2358)]
public object AddWebReference (string bstrUrl, string bstrName);
[<System.Runtime.InteropServices.DispId(2358)>]
abstract member AddWebReference : string * string -> obj
Public Function AddWebReference (bstrUrl As String, bstrName As String) As Object
Parameters
- bstrUrl
- String
Required. Typically, this is a file name URL with a .disco or .vsdisco extension.
- bstrName
- String
Required. Name of the Web service folder.
Returns
A ProjectItem object that is the new Web Reference folder.
- Attributes
Remarks
If the WebReferencesFolder
property is Nothing
(a null reference), then a ProjectItem for the Web References folder of the project is created and the WebReferencesFolder
property is set.
When a Web reference to a Web service is created, a new folder type, ProjectItem, is added to the project's ProjectItems collection. This new ProjectItem contains, in its ProjectItems property, the individual items that make up a Web reference specification. The four types of items included in a Web reference specification are described in the following table.
Item | Purpose |
---|---|
Map file (Reference.map) | This XML file maps URLs to the local cached file location. It lists the discovery file and the service contract files for the Web service. |
Service Contract files (.wsdl) | These SOAP files specify the interface of the Web service. There may be more than one contract file in the Web Reference folder. |
XML Schema Definition files (.xsd) | These files contain XML schema definitions for the Web service. There may be more than one schema file in the Web Reference folder. |
Discovery file (.disco or .vsdisco) | This XML file contains links to other resources that describe the Web service. |