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.

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

System.Object
  System.Web.Services.Description.ServiceDescriptionFormatExtension
    System.Web.Services.Description.MimeContentBinding

<XmlFormatExtensionAttribute("content", "http://schemas.xmlsoap.org/wsdl/mime/",
	GetType(MimePart), GetType(InputBinding), GetType(OutputBinding))>
<XmlFormatExtensionPrefixAttribute("mime", "http://schemas.xmlsoap.org/wsdl/mime/")>
Public NotInheritable Class MimeContentBinding
	Inherits ServiceDescriptionFormatExtension

NameDescription
System_CAPS_pubmethodMimeContentBinding()

Initializes a new instance of the MimeContentBinding class.

NameDescription
System_CAPS_pubpropertyHandled

Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is used by the import process when the extensibility element is imported.(Inherited from ServiceDescriptionFormatExtension.)

System_CAPS_pubpropertyParent
System_CAPS_pubpropertyPart

Gets or sets the name of the MessagePart to which the MimeContentBinding applies.

System_CAPS_pubpropertyRequired

Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers.(Inherited from ServiceDescriptionFormatExtension.)

System_CAPS_pubpropertyType

Gets or sets a value indicating the format of the body of the HTTP transmission.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticNamespace

Specifies the URI for the XML namespace of the MimeContentBinding class. This field is constant.

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.

Imports System
Imports System.Web.Services.Description

Namespace MimeContentBinding_work

   Class MyMimeContentClass

      Shared Sub Main()
         Dim myServiceDescription As ServiceDescription = _
            ServiceDescription.Read ("MimeContentSample_vb.wsdl")

         ' Get the Binding.
         Dim myBinding As Binding = myServiceDescription.Bindings("b1")

         ' Get the first OperationBinding.
         Dim myOperationBinding As OperationBinding = myBinding.Operations(0)
         Dim myOutputBinding As OutputBinding = myOperationBinding.Output
         Dim myServiceDescriptionFormatExtensionCollection As _
            ServiceDescriptionFormatExtensionCollection = _
            myOutputBinding.Extensions

         ' Find all MimeContentBinding objects in extensions.
         Dim myMimeContentBindings As MimeContentBinding() = _
            CType(myServiceDescriptionFormatExtensionCollection.FindAll( _
            GetType(MimeContentBinding)), MimeContentBinding())

         ' Enumerate the array and display MimeContentBinding properties.
         Dim myMimeContentBinding As MimeContentBinding
         For Each myMimeContentBinding In  myMimeContentBindings
            Console.WriteLine("Type: " & myMimeContentBinding.Type)
            Console.WriteLine("Part: " & myMimeContentBinding.Part)
         Next myMimeContentBinding
         Console.WriteLine("Namespace: " & MimeContentBinding.Namespace)
      End Sub 'Main 
   End Class 'MyMimeContentClass
End Namespace 'MimeContentBinding_work

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: