WebServiceBindingAttribute Constructor (String, String, String)
.NET Framework 4
Initializes a new instance of the WebServiceBindingAttribute class.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- name
- Type: System.String
The name of the binding an XML Web service method is implementing an operation for. Sets the Name property.
- ns
- Type: System.String
The namespace associated with the binding. Sets the Namespace property.
- location
- Type: System.String
The location where the binding is defined.
The following example specifies a binding named RemoteBinding that is a member of the http://www.contoso.com/MyBinding namespace and defined at http://www.contoso.com/MyService.asmx?wsdl.
// Binding is defined on a remote server, but this XML Web service implements // at least one operation in that binding. [ WebServiceBinding(Name="RemoteBinding", Namespace="http://www.contoso.com/MyBinding", Location="http://www.contoso.com/MyService.asmx?wsdl" )] public class BindingSample { [ SoapDocumentMethod(Binding="RemoteBinding")] [ WebMethod() ] public string RemoteBindingMethod() { return "Member of a binding defined on another server"; } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.