![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
You can use TIBCO BusinessConnect SOAP Protocol to send and receive attachments in binary format, such as .jpg, .zip, or .doc, or in the text format. TIBCO BusinessConnect SOAP Protocol private process sends the attachments to BusinessConnect, or receives the attachments from BusinessConnect.
• name The name of the attachment
• content-type The type of the content associated with this attachment, such as text of binary
• content-id The content ID for the attachment
• content Content of the attachment
• originalContentType The original received content typeThis field is only available for the ResponderRequest and InitiatorResponse private process messages. It has the same value as the content-type field, unless the content-type field cannot be inferred by Business Connect. In that case, the content-type field is changed to application/octet-stream and the originalContentType field is set to the actual value that is received.
MTOM and attachments from the private process cannot be used together. If the SOAP MTOM Enabled check box is selected, meanwhile some attachments are also specified from the private process request message, the request is rejected and the outbound process is ended.See Configuring General Properties for a Partner on how to select SOAP MTOM.When attachments are present, SOAP messages are formulated as multipart Multipurpose Internet Mail Extensions (MIME) messages and TIBCO BusinessConnect SOAP Protocol depends on the parameters in the content-type field for packaging.
− Content-Type Indicates the type of the content embedded in the part.
− Content-Disposition Indicates the presentation style used for the MIME part.
− Content-Transfer-Encoding Indicates the encoding used for the MIME part.
− Content-ID Indicates the content from anywhere in the multipart SOAP message.The value in the content-type field must be defined in the type/subtype format, such as text/xml, application/zip, and so on.TIBCO BusinessConnect SOAP Protocol processes the attachment content based on the value in the content-type field as follows:
• Content is processed as plain text and the content type is referred to as text if it is in the text/* or application/*xml* formats.
• Content is processed as binary and the content type is referred to as binary if it is in the application/binary, application/octet-stream, application/zip, application/pdf, application/doc, image/*, audio/*, or video/* formats.
• Content type that is not in text or in binary format is processed as unknown and referred to as unknown. Content is packaged or interpreted as either text or binary, depending on the situation.
• If the value in the content-type field does not conform to the Request for Comments (RFC) standard, it is changed to application/octet-stream and the content is processed as binary.The only exception to this rule is when the value in the content-type field is defined as binary and is subsequently changed to application/binary. This change is made to maintain backward compatibility with TIBCO BusinessConnect SOAP Protocol 5.0.The value in the content-type field for attachments must conform to MIME [RFC2045] standards, for example, it has to be in the type/subtype format. For complete syntax of this property, see RFC 2045 at http://www.ietf.org/rfc/rfc2045.txt.Outbound attachments are populated for the outbound request or response messages such as InitiatorRequest or ResponderResponse.If the value in the content-type field is not specified, it is determined based on the type of content:
•
• If content is of type byte Array, the value in the content-type field defaults to application/octet-stream.
• If the value in the content-type field is text, content is converted to bytes and the attachment is populated.
• If the value in the content-type field is binary, content is base64 decoded if it was previously base64 encoded. Otherwise, content is converted to bytes and the attachment is populated.
• If the value in the content-type field is unknown, the content type is changed to application/octet-stream, content is converted to bytes, and the attachment is populated.
• If the attachment content type is text, content is sent to the private process as text.
• If the attachment content type is binary, content is base64 encoded and sent to the private process.
• If the attachment content type is unknown, content is base64 encoded and sent to the private process. In this case, the value in the content-type field is changed to application/octet-stream and the content is processed as binary. For example, even if the plain text is received with the value in the content-type field described as unknown, this content is base64 encoded.Attachments are converted to base64 string as follows:
1. Content-Transfer-Encoding is inspected. If it is base64, content is sent as base64 to the private process.
2. Content itself is inspected for base64 characters. If all the characters are in the base64 character range, content is sent as base64. Otherwise, content is base64 encoded and sent.For inbound attachments, if the content type is unknown, it is changed to application/octet-stream. The same value is passed on to the private process in the content-type field. The original value received is populated in the originalContentType field.For text and binary content types, the content-type and originalContentType fields for the private process have the same value. The originalContentType field is populated even when the attachment property from the release 5.0 is preserved.where <tpname> is the name of the trading partner. When enabled, the original content type that was received is sent to the private process.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |