Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SoapRpcMethodAttribute Class

Specifies that SOAP messages sent to and from the method use RPC formatting.

Namespace:  System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)

[AttributeUsageAttribute(AttributeTargets::Method)]
public ref class SoapRpcMethodAttribute sealed : public Attribute

Web Services Description Language (WSDL) defines two styles for how an XML Web service method, or operation, can be formatted in a SOAP message: RPC and Document. RPC formatting refers to formatting the operation according to the SOAP specification for using SOAP for RPC; otherwise known as Section 7 of the SOAP specification. RPC formatting states that all parameters are encapsulated within a single XML element named after the XML Web service method and that each XML element within that XML element represents a parameter named after the parameter it is representing.

SOAP messages formatted in both the RPC and Document styles can be used to communicate with an XML Web service in a Remote Procedure Call (RPC) manner; however the Document style can also easily be used to communicate in a loosely coupled manner. Therefore, Document style XML Web services is recommended. For more details, see the Customizing SOAP Messages topic.

For more details, see [<topic://cpconCustomizingSOAPInASPNETWebServicesWebServiceClients>].

This attribute can be applied to an XML Web service method on the server and a proxy class on the client. XML Web service methods that have the OneWay property set to true do not have access to their HttpContext. As such, accessing any of the properties of the WebService class return nullptr.

The following code example sets the message style to Rpc for the GetUserName XML Web service method.

No code example is currently available or this language may not be supported.

System::Object
  System::Attribute
    System.Web.Services.Protocols::SoapRpcMethodAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft