SoapHeaderBinding::MapToProperty Property

 

Gets or sets a value indicating whether the SoapHeaderBinding instance is mapped to a specific property in generated proxy classes.

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

public:
property bool MapToProperty {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if the SoapHeaderBinding maps to a specific property; otherwise false.

// Read from an existing wsdl file.
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MapToProperty_cpp.wsdl" );

// Get the existing binding
Binding^ myBinding = myServiceDescription->Bindings[ "MyWebServiceSoap" ];
OperationBinding^ myOperationBinding = (OperationBinding^)(myBinding->Operations[ 0 ]);
InputBinding^ myInputBinding = myOperationBinding->Input;

// Get the 'SoapHeaderBinding' instance from 'myInputBinding'.
SoapHeaderBinding^ mySoapHeaderBinding = (SoapHeaderBinding^)(myInputBinding->Extensions[ 1 ]);
if ( mySoapHeaderBinding->MapToProperty )
   Console::WriteLine( "'SoapHeaderBinding' instance is mapped to a specific property in proxy generated class" );
else
   Console::WriteLine( "'SoapHeaderBinding' instance is not mapped to a specific property in proxy generated class" );

.NET Framework
Available since 1.1
Return to top
Show: