次の方法で共有


SoapDocumentServiceAttribute.RoutingStyle プロパティ

SOAP メッセージを XML Web サービスにルーティングする方法を取得または設定します。

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);

プロパティ値

SOAP メッセージを XML Web サービスにルーティングする方法を表す SoapServiceRoutingStyle 。既定値は SoapAction です。

使用例

 
<%@ 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] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

SoapDocumentServiceAttribute クラス | SoapDocumentServiceAttribute メンバ | System.Web.Services.Protocols 名前空間