Compartir a través de


SoapDocumentServiceAttribute.RoutingStyle Propiedad

Definición

Obtiene o establece cómo se enrutan los mensajes SOAP al servicio Web XML.

public:
 property System::Web::Services::Protocols::SoapServiceRoutingStyle RoutingStyle { System::Web::Services::Protocols::SoapServiceRoutingStyle get(); void set(System::Web::Services::Protocols::SoapServiceRoutingStyle value); };
public System.Web.Services.Protocols.SoapServiceRoutingStyle RoutingStyle { get; set; }
member this.RoutingStyle : System.Web.Services.Protocols.SoapServiceRoutingStyle with get, set
Public Property RoutingStyle As SoapServiceRoutingStyle

Valor de propiedad

SoapServiceRoutingStyle

SoapServiceRoutingStyle que representa cómo se enrutan los mensajes SOAP al servicio Web XML. El valor predeterminado es SoapAction.

Ejemplos

<%@ WebService Language="c#" Class="SumService" %>

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

    [SoapDocumentService(SoapBindingUse.Literal,
                         SoapParameterStyle.Wrapped,
                         RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
    public class SumService : System.Web.Services.WebService
    {
        [WebMethod]
        public int Add(int a, int b)
        {
            return a + b;
        }
    }
<%@ WebService Language="VB" Class="SumService" %>

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

    <SoapDocumentService(SoapBindingUse.Literal, _
                             SoapParameterStyle.Wrapped, _
                             RoutingStyle := SoapServiceRoutingStyle.SoapAction)> _
    Public Class SumService 
          Inherits System.Web.Services.WebService
    
        <WebMethod> _
        Public Function Add(a As Integer, b as Integer)
           return a + b
        End Function
    End Class

Se aplica a