Compartir a través de


WebServiceBindingAttribute.Name Propiedad

Definición

Obtiene o establece el nombre del enlace.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

Valor de propiedad

Nombre del enlace. El valor predeterminado es el nombre del servicio Web XML seguido de "Soap".

Ejemplos

En el ejemplo siguiente se especifica un enlace denominado LocalBinding que se define en el BindingSample servicio web XML.

<%@ WebService Language="C#" class="BindingSample" %>

using System;
using System.Web.Services;
using System.Web.Services.Protocols;

// Binding is defined in this XML Web service and uses the default namespace.
 [ WebServiceBinding(Name="LocalBinding")]
 public class BindingSample  {

      [ SoapDocumentMethod(Binding="LocalBinding")]
      [ WebMethod() ]
      public string LocalBindingMethod() {
               return "Member of binding defined in this XML Web service and member of the default namespace";
      }

 }
<%@ WebService Language="VB" class="BindingSample" %>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols

' <Snippet1>
' Binding is defined in this XML Web service and uses the default namespace.
<WebServiceBinding(Name := "LocalBinding")> _
Public Class BindingSample    
    
    <SoapDocumentMethod(Binding := "LocalBinding"), WebMethod()> _
    Public Function LocalBindingMethod() As String
    
        Return "Member of binding defined in this XML Web service and member of the default namespace"
    End Function 'LocalBindingMethod
    
End Class
   
' </Snippet1>

Se aplica a