SoapHeader.Role Property
Assembly: System.Web.Services (in system.web.services.dll)
[ComVisibleAttribute(false)] public: property String^ Role { String^ get (); void set (String^ value); }
/** @property */ public String get_Role () /** @property */ public void set_Role (String value)
public function get Role () : String public function set Role (value : String)
Not applicable.
Property Value
A URI that represents the recipient of the SOAP header. The default is an empty string ("").To set the recipient of a SOAP header, set the Actor property. Regardless of the version of the SOAP protocol used to communicate with an XML Web service, the .NET Framework automatically generates the SOAP message specific to the version of the SOAP protocol. Specifically, the XML element and XML namespace representing the recipient differ for the two versions.
XML Web services receiving the SOAP header can get the intended recipient by getting either the Role or Actor properties.
The recipient(s) for the Body element and each of the SOAP headers within the Header element of a SOAP message need not be the same. If a Header element exists in the SOAP message, it represents additional data that can be sent to and from the XML Web service method or an intermediary. The recipient of that data, known as the SOAP Role in version 1.2 of the SOAP specification and the SOAP Actor in version 1.1, can be a different URI than the URI for the XML Web service method.
For more information on the SOAP actor attribute, see the SOAP specification at http://www.w3.org/TR/SOAP/.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.