The XML grammar is an open definition containing the attribute = value pairs of a business object. The XML grammar supports the concept of embedded business objects and business object containers.
This adapter uses an XML format for sending business objects into and out of the integration broker. This format is defined generically to support any new business objects created inside the integration broker through the business object designer. This section describes what that format is (XML schema) and how the XML instance reflects the integration broker business object. Understanding this format enables you to add new objects for your adapter to support as well as modify existing business objects.
An object definition begins with a BusinessObject tag. The attributes for this tag are as follows:
BusinessObject
The contents of each BusinessObject element are Attributes. The attributes are as follows:
Attribute
To define a business object as the attribute, the value of type is SINGLECARDSTRING (for single cardinality objects) or MULTIPLECARDSTRING (for n-cardinality objects). In this case, the content of the tag is a BusinessObject element (or multiple elements in the case of n-cardinality). With this grammar, arbitrary depth business objects can be expressed.
The schema is included in the following example for reference with a sample object definition:
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="BusinessObject"> <xsd:annotation> <xsd:documentation> Grammar definition for WBI Business Objects </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="unbounded" minOccurs="1" ref="Attribute"/> </xsd:sequence> <xsd:attribute name="type" type="xsd:string" use="required"/> <xsd:attribute name="verb" type="xsd:string" use="required"/> <xsd:attribute name="class" type="xsd:string" use="required"/> </xsd:complexType> </xsd:element> <xsd:element name="Attribute"> <xsd:complexType mixed="true"> <xsd:choice maxOccurs="unbounded" minOccurs="0"> <xsd:element ref="BusinessObject"/> </xsd:choice> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="type" type="xsd:string" use="required"/> </xsd:complexType> </xsd:element> </xsd:schema>
The following is a simple example.
<?xml version="1.0" encoding="UTF-8"?> <BusinessObject class="EMail" type="SINGLECARDSTRING" verb="Create"> <Attribute class="Header" name="Header" type="SINGLECARDSTRING"> <BusinessObject class="Header" type="SINGLECARDSTRING"> <Attribute name="sendDate" type="Date">2003-1-18</Attribute> <Attribute name="subject" type="String">Greetings</Attribute> <Attribute class="Name" name="Recipients" type="MULTIPLECARDSTRING"> <BusinessObject class="Name" type="SINGLECARDSTRING"> <Attribute name="FirstName" type="String">John</Attribute> <Attribute name="LastName" type="String">Doe</Attribute> </BusinessObject> <BusinessObject class="Name" type="SINGLECARDSTRING"> <Attribute name="FirstName" type="String">Jane</Attribute> <Attribute name="LastName" type="String">Doe</Attribute> </BusinessObject> </Attribute> </BusinessObject> </Attribute> <Attribute name="body" type="String">Hello All</Attribute> </BusinessObject>