HTTP Sending and Receiving MIMEAttachments
This sample shows how the HTTP Receiver, HTTP Response, and HTTP Request activities can be used to send MIME attachments over HTTP.
The sample proceeds as follows:
- The Client process sends a HTTP Request with three attachments.
- The Server process responds with a HTTP Response with two attachments.
Copy the TIBCO_HOME\bw\n.n\samples\palette\http\MIMEAttachment\attachment1.gif file to the c:\tmp folder on Windows or the /tmp folder on UNIX.
- Procedure
- In the samples directory, select and double-click tibco.bw.sample.palette.http.MIMEAttachment. For more information, see Accessing Samples.
- In Project Explorer expand the tibco.bw.sample.palette.http.MIMEAttachment project.
- Fully expand the Processes directory and double-click Client.bwp.
- Click .
- At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
- Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the checkbox next to tibco.bw.sample.palette.http.MIMEAttachment.application.
- Click
Debug.
This runs the sample in the Debug mode.
- Click the
Terminate
icon to stop the process.
[Server] Received attachment of content-type: application/octet-stream
[Server] Received attachment of content-type: image/gif
[Server] Received attachment of content-type: text/plain
[Server] Received attachment of content-type: image/gif
Reply sent with attachment
[Client] Received attachment of content-type=: text/plain
[Client] Received attachment of content-type=: image/gif
Understanding the Configuration
The client process sends a HTTP Request with following three attachments:
- textContent
- binaryContent
- fileName
The server process responds with a HTTP Response with following two attachments:
- textContent
- binaryContent