MimeContentBinding Class
Represents an extensibility element added to an InputBinding or an OutputBinding within an XML Web service, specifying the MIME format for the body of the HTTP transmission. This class cannot be inherited.
System.Web.Services.Description::ServiceDescriptionFormatExtension
System.Web.Services.Description::MimeContentBinding
Assembly: System.Web.Services (in System.Web.Services.dll)
[XmlFormatExtensionAttribute(L"content", L"http://schemas.xmlsoap.org/wsdl/mime/", typeof(MimePart), typeof(InputBinding), typeof(OutputBinding))] [XmlFormatExtensionPrefixAttribute(L"mime", L"http://schemas.xmlsoap.org/wsdl/mime/")] public ref class MimeContentBinding sealed : public ServiceDescriptionFormatExtension
The MimeContentBinding type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Handled | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is used by the import process when the extensibility element is imported. (Inherited from ServiceDescriptionFormatExtension.) |
![]() | Parent | Gets the parent of the ServiceDescriptionFormatExtension. (Inherited from ServiceDescriptionFormatExtension.) |
![]() | Part | Gets or sets the name of the MessagePart to which the MimeContentBinding applies. |
![]() | Required | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers. (Inherited from ServiceDescriptionFormatExtension.) |
![]() | Type | Gets or sets a value indicating the format of the body of the HTTP transmission. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
For more information about specifying protocols for XML Web services, see [<topic://cpconbuildingaspnetwebservices>]. For more information about Web Services Description Language (WSDL), see the specification at http://www.w3.org/TR/wsdl/.
The following example demonstrates the use of the properties and methods exposed by the MimeContentBinding class.
#using <System.dll> #using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Collections; int main() { ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MimeContentSample_cpp.wsdl" ); // Get the Binding. Binding^ myBinding = myServiceDescription->Bindings[ "b1" ]; // Get the first OperationBinding. OperationBinding^ myOperationBinding = myBinding->Operations[ 0 ]; OutputBinding^ myOutputBinding = myOperationBinding->Output; ServiceDescriptionFormatExtensionCollection ^ myServiceDescriptionFormatExtensionCollection = myOutputBinding->Extensions; // Find all MimeContentBinding objects in extensions. array<MimeContentBinding^>^myMimeContentBindings = (array<MimeContentBinding^>^)myServiceDescriptionFormatExtensionCollection->FindAll( MimeContentBinding::typeid ); // Enumerate the array and display MimeContentBinding properties. IEnumerator^ myEnum = myMimeContentBindings->GetEnumerator(); while ( myEnum->MoveNext() ) { MimeContentBinding^ myMimeContentBinding = safe_cast<MimeContentBinding^>(myEnum->Current); Console::WriteLine( "Type: {0}", myMimeContentBinding->Type ); Console::WriteLine( "Part: {0}", myMimeContentBinding->Part ); } Console::WriteLine( "Namespace: {0}", MimeContentBinding::Namespace ); }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.




