# Using Message Attachments

Business processes can exchange business messages with trading partners via ebXML or RosettaNet. These business messages include one or more attachments containing XML or non-XML data.

Note: For ebXML messages, each attachment represents a single payload in the ebXML message.

Attachments can be any of the following Java types:

Type | Description
XmlObject | Represents untyped XML format data.
XmlObject[] | Used for ebXML only—an array containing one or more XmlObject elements.
RawData | Represents any non-XML structured or unstructured data for which no MFL file (and therefore no known schema) exists.
RawData[] | Used for ebXML only—an array containing one or more RawData elements
MessageAttachment[] | Represents either untyped XML or non-XML data in a message attachment. Used for payloads in business messages that contain both untyped XML and non-XML data.

Attachments can also be typed XML or typed MFL data as long as you specify the corresponding XML Bean or MFL class name in the parameter.

If you use arrays as attachment type, certain restrictions apply to the order of your arguments. For more informations, see Specifying XmlObject and RawData Array Payloads.

For business messages containing both untyped XML and non-XML data, the message payload is represented as an array of MessageAttachment objects: MessageAttachment[]

The following APIs in the com.bea.data package provide access to individual MessageAttachment objects within the array:

Object | Description
MessageAttachment Interface | Represents part of a message attachment in an ebXML or RosettaNet business message. Provides methods for retrieving untyped XML or non-XML data from an attachment.
MessageAttachment.Factory Class | Factory for creating MessageAttachment instances. Provides methods for creating MessageAttachment instances from untyped XML or non-XML data.

For more information about using the message attachment APIs, see the interfaces listed in the bea.com.data package in the Java Class Reference.

Related Topics

Guide to Building Business Processes

ebXML Control

RosettaNet Control

Introducing Trading Partner Integration at http://edocs.bea.com/wli/docs81/tpintro/index.html

WebLogic Workshop Reference

Java Class Reference