This documentation is archived and is not being maintained.

SoapDocumentServiceAttribute.RoutingStyle Property

Gets or sets how SOAP messages are routed to the XML Web service.

[Visual Basic]
Public Property RoutingStyle As SoapServiceRoutingStyle
[C#]
public SoapServiceRoutingStyle RoutingStyle {get; set;}
[C++]
public: __property SoapServiceRoutingStyle get_RoutingStyle();
public: __property void set_RoutingStyle(SoapServiceRoutingStyle);
[JScript]
public function get RoutingStyle() : SoapServiceRoutingStyle;
public function set RoutingStyle(SoapServiceRoutingStyle);

Property Value

A SoapServiceRoutingStyle that represents how SOAP messages are routed to the XML Web service. The default value is SoapAction.

Example

[Visual Basic] 
<%@ 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

[C#] 
<%@ 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;
        }
    }

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

SoapDocumentServiceAttribute Class | SoapDocumentServiceAttribute Members | System.Web.Services.Protocols Namespace

Show: