SoapDocumentMethodAttribute.RequestElementName 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
서비스 설명에 작업으로 정의된 XML 웹 서비스 메서드에 대한 SOAP 요청과 연결된 XML 요소를 가져오거나 설정합니다.
public:
property System::String ^ RequestElementName { System::String ^ get(); void set(System::String ^ value); };
public string RequestElementName { get; set; }
member this.RequestElementName : string with get, set
Public Property RequestElementName As String
속성 값
서비스 설명에 작업으로 정의된 XML 웹 서비스 메서드에 대한 SOAP 요청과 연결된 XML 요소입니다. 기본값은 XML 웹 서비스 메서드의 이름입니다.
예제
다음 코드 예제에서는 SOAP 요청 MyCustomElement에서 XML 웹 서비스 메서드와 연결된 XML 요소의 이름을 설정합니다.
<%@ WebService Language="C#" Class="SoapDocumentMethodSample" %>
using System.Web.Services;
using System.Web.Services.Protocols;
public class SoapDocumentMethodSample
{
[WebMethod]
[SoapDocumentMethod(RequestNamespace="http://www.contoso.com",RequestElementName="MyCustomElement")]
public int[] RequestDocument(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(RequestNamespace :="http://www.contoso.com",RequestElementName := "MyCustomRequestElement")> _
Public Function RequestDocument(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
설명
SOAP RequestElementName 요청 ParameterStyleWrapped의 요소 아래에 Body 매개 변수를 래핑하는 데 사용되는 XML 요소를 정의합니다. 이는 XML 웹 서비스에 대한 서비스 설명 내에서 XML 웹 서비스 메서드에 대한 SOAP 요청을 나타내는 XSD 스키마에 반영됩니다.