SoapDocumentMethodAttribute.ResponseNamespace 속성

정의

XML Web services 메서드의 SOAP 응답과 관련된 XML 네임스페이스를 가져오거나 설정합니다.

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

속성 값

String

XML Web services 메서드의 SOAP 응답과 관련된 XML 네임스페이스입니다. 기본값은 http://tempuri.org/입니다.

예제

다음 코드 예제에서는 합니다 ResponseNamespace 속성을 http://www.contoso.com입니다.

<%@ WebService Language="C#" Class="SoapDocumentMethodSample" %>
    
using System.Web.Services;
using System.Web.Services.Protocols;

public class SoapDocumentMethodSample
{
   [WebMethod]
   [SoapDocumentMethod(ResponseNamespace="http://www.contoso.com",ResponseElementName="MyCustomResponseElement")]
   public int[] ResponseDocument(int numentries)
   {
    int[] intarray = new int[numentries];
        for (int i=0;i<numentries;i++)
        {
       intarray[i] = i;
        }
        return intarray;
   }
}
<%@ WebService Language="VB" Class="SoapDocumentMethodSample" %>
    
Imports System.Web.Services
Imports System.Web.Services.Protocols

Public Class SoapDocumentMethodSample

   <WebMethod(),SoapDocumentMethod(ResponseNamespace :="http://www.contoso.com",ResponseElementName := "MyCustomResponseElement")> _
   Public Function  ResponseDocument(numentries as Integer) As Integer()
    Dim intarray(numentries - 1) as Integer
        Dim i as Integer
        For i = 0 To numentries - 1
           intarray(i) = i
        Next
        Return intarray
   End Function
End Class

설명

ResponseNamespace 속성은 해당 서비스 설명에서 XML 웹 서비스 메서드에 대 한 XSD 스키마에서 사용 합니다.

적용 대상