Creating business objects

In WebSphere business integration system business objects, metadata is stored in a business object definition and which helps the connector interact with an application. A metadata-driven connector handles each business object that it supports based on metadata encoded in the business object definition rather than on instructions hard-coded in the connector.

Business object metadata includes the structure of a business object, the settings of its attribute properties, and the content of its application-specific information. Because the adapter is metadata-driven, it can handle new or modified business objects without requiring modifications to the connector code. However, the connector's configured data handler makes assumptions about the structure of its business objects, object cardinality, the format of the application-specific information, and the database representation of the business object. Therefore, when you create or modify a business object for SAP XI, your modifications must conform to the rules the connector is designed to follow, so that the connector can correctly process new or modified business objects.

After installing the adapter, create business objects. There are no requirements regarding the structure of the business objects other than those imposed by the configured data handler. The business objects that the connector processes can have any name allowed by Integration Broker. For more on naming conventions, see Naming CrossWorlds Components.

Generating busines objects

There are two methods for generating business objects. The preferred method is to generate business objects from imported IDOC structures. The alternate method is to generate business objects from XML schema definitions in the SAP Interface Repository (IFR).

Generating Business Objects from XML Schema (XSD) definitions

XML Object Discovery Agent (ODA) generates business objects from any schema or document type definition (DTD) that conforms to W3C guidelines. For more information about this functionality, see the XML ODA User Guide. To generate business objects for the SAP XI adapter:

  1. Download the XML Schema definition from a URL location or from the SAP XI Repository.
  2. Launch XML ODA.
Note:
When using Business Objects generated from XML Schema definitions, you may need to define interface mapping in SAP XI.

Generating business objects from IDoc structures

The preferred method for generating business objects is to import them from existing IDoc structures. To generate business objects for the SAP XI adapter:

  1. Start the SAP XI repository.
  2. Double-click on the software component with which you want to work. (For information on maintaining software components in the System Landscape directory (SLD), refer to the SAP XI documentation.)
  3. Maintain connection data for the SAP system.
  4. Under your software interface, right-click on Imported Objects.
  5. Choose Import RFC/IDoc.
  6. Save the imported IDoc structure to a local XSD schema file.
  7. Use the IDoc schema file with XML ODA to generate business objects.

Generating business objects from IFR IDoc XML schemas

XML Object Discovery Agent (ODA) generates business objects from any schema or document type definition (DTD) that conforms to W3C guidelines. For more information about this functionality, see the XML ODA User Guide. To generate business objects for the SAP XI adapter:

  1. Connect to http://ifr.sap.com.
  2. Choose Enter the Interface Repository from the navigation bar.
  3. Download the object you need, and save it as an .xsd file.
  4. Launch XML ODA and use Business Object Designer to connect to the ODA and load the .xsd file.
Note:
When using Business Objects generated from IFR IDoc schemas, you need to define interface mapping in SAP XI. The interface mapping should be defined for the IFR schema to the imported IDOC struture.

Sample business object properties

Below is a sample business object properties for an SAP XI connector with the XML data handler.

[ReposCopy]Version = 3.0.0

[End]

[BusinessObjectDefinition]

Name = MATMAS01

Version = 3.0.0

AppSpecificInfo = elem_fd=unqualified;attr_fd=unqualified

[Attribute]

Name = XMLDeclaration

Type = String

Cardinality = 1

MaxLength = 255

IsKey = false

IsForeignKey = false

IsRequired = false

AppSpecificInfo = type=pi

IsRequiredServerBound = false

[End]

[Attribute]

Name = ROOT

Type = MATMAS01_MATMAS01

ContainedObjectVersion = 3.0.0

Relationship = Containment

Cardinality = 1

MaxLength = 255

IsKey = false

IsForeignKey = false

IsRequired = false

AppSpecificInfo = elem_name=MATMAS01

IsRequiredServerBound = false

[End]

[Attribute]

Name = ObjectEventId

Type = String

Cardinality = 1

MaxLength = 255

IsKey = false

IsForeignKey = false

IsRequired = false

IsRequiredServerBound = false

[End]

[Verb]

Name = Create

[End]

[Verb]

Name = Delete

[End]

[Verb]

Name = Retrieve

[End]

[Verb]

Name = Update

[End]

Copyright IBM Corp. 1997, 2003