SoapDocumentServiceAttribute.RoutingStyle Vlastnost

Definice

Získá nebo nastaví způsob směrování zpráv SOAP do webové služby 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

Hodnota vlastnosti

SoapServiceRoutingStyle

A SoapServiceRoutingStyle , který představuje způsob směrování zpráv SOAP do webové služby XML. Výchozí hodnota je SoapAction.

Příklady

<%@ 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

Platí pro