MimeXmlBinding Class
Represents an extensibility element added to a MimePart, an InputBinding or an OutputBinding. It specifies the schema for XML messages that are not SOAP compliant. This class cannot be inherited.
System.Web.Services.Description::ServiceDescriptionFormatExtension
System.Web.Services.Description::MimeXmlBinding
Assembly: System.Web.Services (in System.Web.Services.dll)
The MimeXmlBinding 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 MimeXmlBinding applies. |
![]() | Required | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers. (Inherited from ServiceDescriptionFormatExtension.) |
| 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 a typical use of the MimeXmlBinding class.
#using <System.Xml.dll> #using <System.Web.Services.dll> #using <System.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Collections; using namespace System::Xml; int main() { try { ServiceDescription^ myDescription = ServiceDescription::Read( "MimeXmlBinding_Part_3_Input_CPP.wsdl" ); // Create the 'Binding' object. Binding^ myBinding = gcnew Binding; // Initialize 'Name' property of 'Binding' class. myBinding->Name = "MimeXmlBinding_Part_3_ServiceHttpPost"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:MimeXmlBinding_Part_3_ServiceHttpPost" ); myBinding->Type = myXmlQualifiedName; // Create the 'HttpBinding' object. HttpBinding^ myHttpBinding = gcnew HttpBinding; myHttpBinding->Verb = "POST"; // Add the 'HttpBinding' to the 'Binding'. myBinding->Extensions->Add( myHttpBinding ); // Create the 'OperationBinding' object. OperationBinding^ myOperationBinding = gcnew OperationBinding; myOperationBinding->Name = "AddNumbers"; HttpOperationBinding^ myHttpOperationBinding = gcnew HttpOperationBinding; myHttpOperationBinding->Location = "/AddNumbers"; // Add the 'HttpOperationBinding' to 'OperationBinding'. myOperationBinding->Extensions->Add( myHttpOperationBinding ); // Create the 'InputBinding' object. InputBinding^ myInputBinding = gcnew InputBinding; MimeContentBinding^ myMimeContentBinding = gcnew MimeContentBinding; myMimeContentBinding->Type = "application/x-www-form-urlencoded"; myInputBinding->Extensions->Add( myMimeContentBinding ); // Add the 'InputBinding' to 'OperationBinding'. myOperationBinding->Input = myInputBinding; // Create an OutputBinding. OutputBinding^ myOutputBinding = gcnew OutputBinding; MimeXmlBinding^ myMimeXmlBinding = gcnew MimeXmlBinding; // Initialize the Part property of the MimeXmlBinding. myMimeXmlBinding->Part = "Body"; // Add the MimeXmlBinding to the OutputBinding. myOutputBinding->Extensions->Add( myMimeXmlBinding ); // Add the 'OutPutBinding' to 'OperationBinding'. myOperationBinding->Output = myOutputBinding; // Add the 'OperationBinding' to 'Binding'. myBinding->Operations->Add( myOperationBinding ); // Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'. myDescription->Bindings->Add( myBinding ); // Write the 'ServiceDescription' as a WSDL file. myDescription->Write( "MimeXmlBinding_Part_3_Output_CPP.wsdl" ); Console::WriteLine( "WSDL file with name 'MimeXmlBinding_Part_3_Output_CPP.wsdl' is" " created successfully." ); } catch ( Exception^ e ) { Console::WriteLine( "Exception: {0}", e->Message ); } }
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.


