Microsoft BizTalk to WebSphere Business Integration Server Express Migration
Introduction to - BizTalk Server 2006 XML · BizTalk Server 2006 Messaging Engine Business Rules...
Transcript of Introduction to - BizTalk Server 2006 XML · BizTalk Server 2006 Messaging Engine Business Rules...
MGö, MBl, JEd C#.NET 2009 1
Introduction to -BizTalk Server 2006
XMLKarlstad University
Department of Computer Science2009
MGö, MBl, JEd C#.NET 2009 2
What is BizTalk Server 2006?
• Microsofts server for building solutions for business process and integration
– Messaging engine– Application
• Integration• Connector
– Business rules engine– ..
MGö, MBl, JEd C#.NET 2009 3
A Customs Facility• The example presented in the following slides is from:• Explaining the BizTalk Architecture to your Grandma By: _ABHILASH_MS_
http://www.codeproject.com/biztalk/BiztalkToGrandma.asp?df=100&forumid=261631&exp=0&select=1353062
MGö, MBl, JEd C#.NET 2009 4
The BizTalk Server 2006 Architecture
MGö, MBl, JEd C#.NET 2009 5
BizTalk Technology
• .NET Framework 2.0• SQL Server 2005• Internet Information Services (IIS) 5.1/6.0• Visual Studio 2005• Microsoft Excel• ..
MGö, MBl, JEd C#.NET 2009 6
Integration through Adapters
Physical files on Hard drive
WWW
SQL Server Database
BizTalk Server 2006
SQL Adapter
File Adapter
HTTP Adapter
MGö, MBl, JEd C#.NET 2009 7
BizTalk Components
BizTalk Server 2006 Messaging Engine
Business Rules Engine Health and Activity Tracking
Business Activity Monitor
Business Activity Services
Orchestration
Enterprise Single Sign-On
Messaging
MGö, MBl, JEd C#.NET 2009 8
Business Rules Engine
• Let you apply business rules against message data.– For rules creation use: the Business Rule Composor.
MGö, MBl, JEd C#.NET 2009 9
MGö, MBl, JEd C#.NET 2009 10
Orchestration
• Graphical interface for routing, evaluation and manipulation of incomingand outgoing messages
• Allows for communicationwith web services, databases, ..
• BizTalk OrchestrationDesigner: a tool for creating visualrepresentations of business processes
MGö, MBl, JEd C#.NET 2009 11
Health and Activity Tracking
• Used for monitoring the BizTalk Messaging Engine and the orchestrations running in it
MGö, MBl, JEd C#.NET 2009 12
Business Activity Monitoring
• Also called BAM, gives nontechnical personnel a portal to view the data
MGö, MBl, JEd C#.NET 2009 13
Business Activity Services
• Functionality for managing and instantiatingintegration relationships with trading partners
MGö, MBl, JEd C#.NET 2009 14
Enterprise Single Sign-On
• Process for by which non-Windowsauthentication accounts can be granted or denied rights
MGö, MBl, JEd C#.NET 2009 15
Messaging
• MessageBox– Based on SQL Server Database– Publish and subscribe pattern
• Involves ports, adapters, pipelines, orchestrations– For maniplation and routing of message data
• XML based– XML Schema Definition
• One of the core components of BizTalk
MGö, MBl, JEd C#.NET 2009 16
Messages
• Trading part message– File: comma-separated values (CSV) text, HTML, ..– Must be converted to XML in order for BizTalk to manipulate,
route, modify the message
MGö, MBl, JEd C#.NET 2009 17
Pipeline
Typical functions performed in a receive pipeline: • Decoding and parsing of incoming data such as an XML file or a flat file• Disassembler; splits message if necessary• Validation; for example, verifying the incoming data against an XML schema • Party resolution; resolves host instance
Typical functions performed in a send pipeline: • Validation• Assembly of an XML document• Encoding• Digital signing
MGö, MBl, JEd C#.NET 2009 18
Pipeline Editor
• Graphicalinterface for convertion of filesto meet the XML requirements
MGö, MBl, JEd C#.NET 2009 19
Schema Editor
• Schema editor for generating the structure/format and the rules for your XML files
MGö, MBl, JEd C#.NET 2009 20
BizTalk Mapper
• Graphical interface for mapping an incoming file to your own XML schema
MGö, MBl, JEd C#.NET 2009 21
BizTalk Mapper cont´d
MGö, MBl, JEd C#.NET 2009 22
Messaging
MGö, MBl, JEd C#.NET 2009 23
BizTalk Server 2006 Architecture
MGö, MBl, JEd C#.NET 2009 24
MGö, MBl, JEd C#.NET 2009 25
Integrating mutiple applications
MGö, MBl, JEd C#.NET 2009 26
Running ExampleThe example on the this slide and next two are from: Microsoft BizTalk Server 2006An integration and business process serverBy Nico Naumann
MGö, MBl, JEd C#.NET 2009 27
Running Example cont´d
MGö, MBl, JEd C#.NET 2009 28
MGö, MBl, JEd C#.NET 2009 29
XML by way of W3School.com
• EXtensible Markup Language– Much like HTML– Describes embedded or referenced data– XML tags are not predefined
• You define your own
– XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
– XML with a DTD or XML Schema is designed to be self-descriptive
– XML is a W3C Standard
MGö, MBl, JEd C#.NET 2009 30
Difference between XML and HTML
• XML and HTML were designed with different goals:– XML was designed to describe data and to
focus on what data is.HTML was designed to display data and to focus on how data looks.
• HTML is about displaying information, while XML is about describing information.
MGö, MBl, JEd C#.NET 2009 31
XML Syntax
• The first line in the document - the XML declaration - defines the XML version and the character encoding used in the document
• The next line describes the root element of the document (like it wassaying: "this document is a note")
• The next 4 lines describe 4 child elements of the root (to, from, heading, and body)
• And finally the last line defines the end of the root element
<?xml version="1.0" encoding="ISO-8859-1"?>
<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
MGö, MBl, JEd C#.NET 2009 32
XML Rules
• All XML elements must have a closing Tag– The declaration is NOT a part of the XML document itself, and
thereby does not need a closing tag
• Tags are case sensitive– <Letter> != <letter>
• XML elements must be properly nested– <b><i>This text is bold and italic</b></i> NOT OK– <b><i>This text is bold and italic</i></b> OK
• XML documents must have a root element– All elements can have sub element. Sub elements must be
correctly nested within their parent element
MGö, MBl, JEd C#.NET 2009 33
XML Rules cont´d
• Attribute values must be quoted– With XML, it is illegal to omit quotation marks
around attribute values
• Whitespaces are preserved– Unlike HTML
MGö, MBl, JEd C#.NET 2009 34
Exercise
• Make an xml-file describing this book.
My First XML
Introduction to XML
•What is HTML •What is XML
XML Syntax
•Elements must have a closing tag•Elements must be properly nested
MGö, MBl, JEd C#.NET 2009 35
XML Attributes
• Data can be stored in child elements or in attributes– Attributes are used to describe overall facts of the element and
nested elements
<person sex="female"> <firstname>Anna</firstname><lastname>Smith</lastname> </person>
<person> <sex>female</sex> <firstname>Anna</firstname> <lastname>Smith</lastname> </person>
MGö, MBl, JEd C#.NET 2009 36
XML Attributes vs. Elements
• There are no rules. However..• Some of the problems with using attributes are:
– attributes cannot contain multiple values (child elements can) – attributes are not easily expandable (for future changes) – attributes cannot describe structures (child elements can) – attributes are more difficult to manipulate by program code– attribute values are not easy to test against a Document Type
Definition (DTD) - which is used to define the legal elements of an XML document
• The exception could, for example, be when dealing with metadata.– Like when you have an ID for an element
MGö, MBl, JEd C#.NET 2009 37
XML Errors
• The W3C XML specification states that a program should not continue to process an XML document if it finds an error.
– The reason is that XML software should be easy to write, and that all XML documentsshould be compatible
MGö, MBl, JEd C#.NET 2009 38
XML Schema
• Describes the structure of an XML document– No content data
• The XML Schema language is also referred to as XML Schema Definition (XSD)
• W3C Standard
• XML Schemas are written in XML
MGö, MBl, JEd C#.NET 2009 39
What exactly is an XML Schema?
• The purpose of an XML Schema is to define the legal building blocks of an XML document
• An XML Schema defines: – elements that can appear in a document– attributes that can appear in a document– which elements are child elements – the order of child elements – the number of child elements – whether an element is empty or can include text – data types for elements and attributes– default and fixed values for elements and attributes
MGö, MBl, JEd C#.NET 2009 40
XML Schema Example
<?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
XML-file
MGö, MBl, JEd C#.NET 2009 41
XML Schema Example cont´d<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified">
<xs:element name="note"> <xs:complexType>
<xs:sequence> <xs:element name="to" type="xs:string"/><xs:element name="from" type="xs:string"/><xs:element name="heading" type="xs:string"/><xs:element name="body" type="xs:string"/>
</xs:sequence> </xs:complexType>
</xs:element>
</xs:schema>
MGö, MBl, JEd C#.NET 2009 42
Complex and Simple Types
• Complex types– Can have nested elements as well as attributes– The note element is a complex type because it
contains other elements
• Simple types– Cannot have nested elements or attributes– The other elements (to, from, heading, body) are
simple types because they do not contain otherelements
MGö, MBl, JEd C#.NET 2009 43
Sequence
• The elements surrounded by this tag needto be sent in the same order as shown in the schema
MGö, MBl, JEd C#.NET 2009 44
Element types
• XML Schema has a lot of built-in data types. The most common types are: – xs:string
– xs:decimal– xs:integer
– xs:boolean– xs:date
– xs:time
MGö, MBl, JEd C#.NET 2009 45
XML Schema Rules
• The <schema> element is the root element of every XML Schema – may contain some attributes– xmlns:xs=http://www.w3.org/2001/XMLSchema
• Indicates that the elements and data types used in the schema come from the "http://www.w3.org/2001/XMLSchema" namespace
• Also specifies that the elements and data types that come from the "http://www.w3.org/2001/XMLSchema" namespace should be prefixed with xs:
– targetNamespace="http://www.w3schools.com" • Indicates that the elements defined by this schema come from the
"http://www.w3schools.com" namespace
– xmlns=http://www.w3schools.com• Indicates that the default namespace is "http://www.w3schools.com"