september 2004 © 2004 ibm corporation september 2004 describing non-xml data using xml schema in...

10
September 2004 © 2004 IBM Corporation © 2004 IBM Corporation September 2004 Describing Describing non-XML data non-XML data using XML Schema using XML Schema in IBM WebSphere in IBM WebSphere Business Integration Business Integration Brokers Brokers Steve Hanson Suman Kalia [email protected] [email protected]

Upload: jocelyn-reed

Post on 02-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

September 2004 © 2004 IBM Corporation

© 2004 IBM CorporationSeptember 2004

Describing Describing non-XML data non-XML data using XML Schema using XML Schema in IBM WebSphere in IBM WebSphere Business Integration Business Integration Brokers BrokersSteve Hanson Suman [email protected] [email protected]

Page 2: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

2 © 2004 IBM Corporation

AgendaAgenda

Broker Overview

Message Parsing

Message Modeling

The Message Model

XML Schema Annotations

Background History

Further Reading

Page 3: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

3 © 2004 IBM Corporation

Broker OverviewBroker Overview

WebSphere Business Integration Message Broker (WBI-MB) enables

information packaged as messages to flow between

different business applications, ranging from large legacy systems through to unmanned devices. A message may be transformed on its way through the broker by a

message flow.

Page 4: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

4 © 2004 IBM Corporation

Message ParsingMessage Parsing<Person age=’32’ height=‘172’>

<Name>Joe Bloggs</Name>

</Person>

struct { int height; int age; char Name[48]; } Person;

172 32 Joe Bloggs

Element

Person

Element age

Element height

Element Name

On input, the broker receives a message

bitstream and parses it into a logical message tree

(similar to an SDO datagraph). On output, the

broker serializes a message tree into a message

bitstream. The parser and serializer understand the structure of the message

because it has been modeled by the user in a

message set.

Page 5: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

5 © 2004 IBM Corporation

Message ModelingMessage Modeling

A message set contains one or more message models. A message model is created using an

Eclipse-based toolkit, either by an importer or by hand using a specialized editor.

When complete, the message set is

generated into a dictionary form for

use by the message broker runtime. It may

also be generated into other formats for consumption by other

applications.

Page 6: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

6 © 2004 IBM Corporation

The Message ModelThe Message Model A message model comprises a Logical Model and one or more Physical Models

The Logical Model is XML Schema with some minor extensions Describes the logical structure of the message

The Physical Model uses the OMG Common Application Metamodel (CAM) CAM includes COBOL, C, PL/1, TypeDescriptor, TDLang models Specifically, Physical Model extends CAM TypeDescriptor Describes the physical layout of the message ‘on the wire’ A Physical Model has a name

A message model is serialized in a .mxsd file This is an XML Schema .xsd file With additional constructs for the Physical Model

The constructs used are xsd:appinfo style xsd:annotations Values of Physical Model properties Names of model objects to enable reconstitution of model

Physical Model is sparse for scalability Typically only non-default property values are serialized

Page 7: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

7 © 2004 IBM Corporation

ExaExample Annotation – xsd:stringmple Annotation – xsd:string

<xsd:element name="Location" type="xsd:string" >

<xsd:annotation>

<xsd:appinfo source="WMQI_APPINFO">

<cwfInclRep messageSetDefaultRep="C_wire_format">

<cwfSimpleRep accessor="readWrite"

addrUnit="byte" alignment="byte" attributeInBit="false"

bigEndian="false" characterSize="1" contentSize="32"

encodingNull="NullPadFill" encodingNullValue=""

lengthUnits="Bytes" lengthEncoding="fixedLength"

offset="0" paddingCharacter="SPACE" size="32"

stringJustification="rightJustify"

typeName="MRCWFStringRep" width="32"/>

</cwfInclRep>

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

Identifies owner of appinfo

Enables modelto be reconstituted

Mix of TD & our own properties

Name of Physical model

Page 8: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

8 © 2004 IBM Corporation

ExaExample Annotation – xsd:intmple Annotation – xsd:int

<xsd:element name=“Duration" type="xsd:int" >

<xsd:annotation>

<xsd:appinfo source="WMQI_APPINFO">

<cwfInclRep messageSetDefaultRep="C_wire_format">

<cwfSimpleRep accessor="readWrite"

addrUnit="byte" alignment="word" attributeInBit="false"

base="2" baseInAddr="8" baseUnits="3

baseWidth="1" bigEndian="false"

contentSize="4" offset="320"

signCoding="twosComplement" signed="true" size="4"

typeName="MRCWFIntegerRep" width="4"/>

</cwfInclRep>

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

Identifies owner of appinfo

Enables modelto be reconstituted

Mix of TD & our own properties

Name of Physical model

Page 9: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

9 © 2004 IBM Corporation

Background HistoryBackground History Development work on broker started in 1998

Original logical & physical message models were proprietary

First release of broker (MQSI V2) in 1Q 2000 Work started in 2000 on new standards based message model

First shipped in broker (WBI-MB V5) in 2Q 2003

Page 10: September 2004 © 2004 IBM Corporation September 2004 Describing non-XML data using XML Schema in IBM WebSphere Business Integration Brokers Describing

10 © 2004 IBM Corporation

Further ReadingFurther Reading Message Broker Toolkit on-line help

http://www-306.ibm.com/software/integration/wbimessagebroker/library/

OMG “UML for Enterprise Application Integration” Includes CAM http://www.omg.org/cgi-bin/doc?formal/2004-03-26