MimePart.Extensions Property

Gets the collection of MIME extensibility elements for the part of the MimeMultipartRelatedBinding of which the MimePart is a member.

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

public:
property ServiceDescriptionFormatExtensionCollection^ Extensions {
	ServiceDescriptionFormatExtensionCollection^ get ();
}
/** @property */
public ServiceDescriptionFormatExtensionCollection get_Extensions ()

public function get Extensions () : ServiceDescriptionFormatExtensionCollection

Not applicable.

Property Value

A ServiceDescriptionFormatExtensionCollection.

This collection must have at least one member. If it has more than one member, the members are alternative MIME formats for the current MimePart. Members can be of the following types:

Each of these classes exposes a Part property specifying the MessagePart with which the MimePart is associated. If this collection has no members, the XML Web service will fail to generate a Web Services Description Language (WSDL) file when it is requested. For more information about how MIME extends WSDL, see the specification at http://www.w3.org/TR/wsdl/.

// Create the OutputBinding.
OutputBinding^ myOutputBinding = myOperationBinding->Output;
MimeXmlBinding^ myMimeXmlBinding = gcnew MimeXmlBinding;
myMimeXmlBinding->Part = "body";

// Create the MimePart.
MimePart^ myMimePart = gcnew MimePart;
myMimePart->Extensions->Add( myMimeXmlBinding );
MimeMultipartRelatedBinding^ myMimePartRelatedBinding = gcnew MimeMultipartRelatedBinding;

// Add the MimePart to the MimePartRelatedBinding.
myMimePartRelatedBinding->Parts->Add( myMimePart );
myOutputBinding->Extensions->Add( myMimePartRelatedBinding );

// Create the OutputBinding.
OutputBinding myOutputBinding = myOperationBinding.get_Output();
MimeXmlBinding myMimeXmlBinding = new MimeXmlBinding();
myMimeXmlBinding.set_Part("body");

// Create the MimePart.
MimePart myMimePart = new MimePart();
myMimePart.get_Extensions().Add(myMimeXmlBinding);
MimeMultipartRelatedBinding myMimePartRelatedBinding =
    new MimeMultipartRelatedBinding();

// Add the MimePart to the MimePartRelatedBinding.
myMimePartRelatedBinding.get_Parts().Add(myMimePart);
myOutputBinding.get_Extensions().Add(myMimePartRelatedBinding);

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: