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 */
public boolean get_MapToProperty ()

/** @property */
public void set_MapToProperty (boolean value)

public function get MapToProperty () : boolean

public function set MapToProperty (value : boolean)

Not applicable.

Property Value

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" );

// Read from an existing wsdl file.
ServiceDescription myServiceDescription 
    = ServiceDescription.Read("MapToProperty_jsl.wsdl");
// Get the existing binding 
Binding myBinding = myServiceDescription.get_Bindings().
    get_Item("MyWebServiceSoap");
OperationBinding myOperationBinding 
    = (OperationBinding)myBinding.get_Operations().get_Item(0);
InputBinding myInputBinding = myOperationBinding.get_Input();
// Get the 'SoapHeaderBinding' instance from 'myInputBinding'.
SoapHeaderBinding mySoapHeaderBinding 
    = (SoapHeaderBinding)myInputBinding.get_Extensions().get_Item(1);
if (mySoapHeaderBinding.get_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");
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: