Using MIME

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that helps extend the capabilities of web services by allowing insertion of images, sounds, and text in a message.

MIME offers the following features to web services are as follows:

  • Support for multiple attachments in a single message
  • Support for non-ASCII characters
  • Support for attachments which may contain executables, audio, images and video files, etc.
  • Support for unlimited message length
  • MIME for Web Services or SOAP with Attachments refers to the method of using Web Services to send and receive files using a combination of SOAP and MIME, primarily over HTTP. Adeptia Suite now supports MIME feature in its web services provider and consumer activities.

Web Service Provider Activity Using MIME

In Adeptia Suite, web service provider activity extracts all the MIME attachments from web service request and send attachments in web service response.
 

Handling MIME Attachments in Request
When your web service provider activity receives a request that has MIME attachments then, please follow the below steps:

  1. While creating a web service provider, you need to check the Enable Attachment checkbox (see Figure 343).

    Figure 343: Enable Attachment Property

  2. If the request has any MIME attachments, then your web service provider stores them in the system.

    The web service provider stores these attachments at a base location that you can configure by the following steps:

    1. From the Adeptia Suite home page, click the Administer tab.
    2. On the Administer tab, click the Update System Properties link.
    3. On the Update System Properties screen, click on Services à Web Service Configuration.
    4. Change the value of the abpm.webservice.metro.soapattachment.location property by giving an absolute path. web/Attachments is the default value.
  3. You can find a list of all the names of the attachments and location of the attachments in the context info of the process flow within these variables:
  • SOAPAttachmentsList variable contains the names of the attachments
  • SOAPAttachmentsLocation variable contains the location of the attachments


   Sending MIME Attachments in Response
When your web service provider activity is sending response with MIME attachments then, please follow the below steps:

  1. Check the Enable Attachment checkbox while creating web service provider activity (see Figure 344).

    Figure 344: Enable Attachment Property

  2. In the process flow designer, create context variable MimeAttachmentFolderPath.
  3. Mention an absolute folder path of the attachments in the MimeAttachmentFolderPath variable.

    If the location of attachments has both attachments and other folders then, the web service provider would only send the files present in the root folder. It will not recursively scan all the other folders for attachments.

  4. The web service provider would then send its response with embedded attachments.

Web Service Consumer Activity Using MIME

In Web Service Consumer activity, send MIME attachments with Web Service request and extract all the attachments in Web Service response.

Sending MIME Attachments in Request

When your web service consumer activity sends a request with MIME attachments then, please follow the below steps:

  1. Create a context variable Service.<entityName>.enableAttachment in the process flow, and set its value to True/Yes if you want to send the attachment with your request.

    entityName is the name of Web Service consumer activity used in the process flow.

     Set the value to False/No if you don’t want to send attachments with your request.

  2. Mention an absolute folder path of the attachments in the Service.<entityName>.mimeAttachmentFolderPath variable.

    If the location of attachments has both attachments and other folders then, the web service consumer would only send the files present in the root folder. It will not recursively scan all the other folders for attachments.

  3. The web service consumer would then send its response with embedded attachments.

   
Handling MIME Attachments in Response
When your web service consumer activity receives a response with MIME attachments then, please follow the below steps:

  1. Create a context variable Service.<entityName>.enableAttachment in the process flow, and set its value to True/Yes if you want to receive the attachment with your response.

    entityName is the name of the Web Service consumer activity used in the process flow.

    Set the value to False/No if you don’t want to receive attachments with your response.

  2. If the response has any MIME attachments, then your web service consumer stores them in the system.

    The web service consumer stores these attachments at a base location that you can configure by the following steps:

    1. From the Adeptia Suite home page, click the Administer tab.
    2. On the Administer tab, click the Update System Properties link.
    3. On the Update System Properties screen, click on Services à Web Service Configuration.
    4. Change the value of the abpm.webservice.metro.soapattachment.location property by giving an absolute path. web/Attachments is the default value.
  3. You can find a list of all the names of the attachments and location of the attachments in the context info of the process flow within these variables:
  • ConsumerSOAPAttachmentsList variable contains the names of the attachments
  • ConsumerSOAPAttachmentsLocation variable contains the location of the attachments