SoapRpcMethodAttribute

SoapRpcMethodAttribute

System.Web.Services.Protocols (system.web.services.dll)sealed class

This attribute is used to specify the encoding for SOAP request and response messages. You can apply this attribute to methods in a web service or in methods in a proxy class that derives from SoapHttpClientProtocol (where it's required to bind the messages to the appropriate web method). You use this attribute, instead of SoapDocumentMethodAttribute, when you want to use the RPC encoding standard.

There are two options for encoding XML information in a SOAP message: RPC and Document. ASP.NET's default is Document. RPC (found in section 7 of the SOAP specification) specifies that all method parameters be wrapped in a single element named after the web service method and that each element be named after their respective parameter name. If you apply this attribute to a web method, it will not be able to return objects because no XSD schema will be generated.

public sealed class SoapRpcMethodAttribute : Attribute { // Public Constructors    public SoapRpcMethodAttribute( );    public SoapRpcMethodAttribute(string action); // Public Instance Properties    public string Action{set; get; }    public string Binding{set; get; }    public bool OneWay{set; get; }    public string RequestElementName{set; get; }    public string RequestNamespace{set; get; }    public string ResponseElementName{set; get; }    public string ResponseNamespace{set; get; } }

Hierarchy

System.Object System.Attribute SoapRpcMethodAttribute

Valid On

Method



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net