Exporting event types to an XML schema

You can create an XML schema file from your event types to write event messages in the correct format, or to share with other application.

Procedure

  1. In the Solution Map for your solution project, click Export event types to XSD.

Alternatively, you can right-click the solution project in the Solution Explorer, and click Export. Then, select Insight Designer > Event Types to XML Schema.

  1. Make sure that the solution project is selected, and click Browse to specify where you want the .xsd file to be created.

    By default, the .xsd file is exported to a schemas folder under the solution project.

  2. Click Finish.

Results

An .xsd file is created for each BOM entry in a namespace folder in the location that you specified. The file name is created from the name of the BOM entry.

Example

The following example shows an event defined in the business definition language. This airport close event has a relationship to an airport entity.

an airport close event is a business event time-stamped by an event datetime (date & time).
an airport close event is related to an airport.

The following XML is generated from the event definition.

<element name="AirportCloseEvent" type="m:AirportCloseEvent"/>
<complexType name="AirportCloseEvent">
 <annotation>
   <appinfo source="http://www.ibm.com/ia/Annotation">
     <event elementName="AirportCloseEvent"/>
   </appinfo>
 </annotation>
<sequence>
<element name="airport" type="string">
  <annotation>
   <appinfo source="http://www.ibm.com/ia/Annotation">
    <businessName name="airport"/>
    <businessType type="sample.acmeairlines.model.Airport"/>  
   </appinfo>
  </annotation>
</element>
<element name="eventDatetime" type="dateTime">
  <annotation>
   <appinfo source="http://www.ibm.com/ia/Annotation">
     <timestamp/>
   </appinfo>
  </annotation>
</element>	
</sequence>
</complexType>

What to do next

You can create an XML message from this schema, or share this schema with other applications such as IBM® Integration Bus and WebSphere® Message Broker.