Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

BizTalk 2010 Recipes : Creating Complex Types

3/26/2011 3:32:38 PM

1. Problem

You want to create an address data type that can be reused, rather than creating the same set of data for every address type.

2. Solution

You can use XSD complex types within the BizTalk Editor. As an example, assume that you need to create your own complex data type for storing shipping addresses for an Order schema:

<Order>
<CompanyName> </CompanyName>
<OrderID> </ OrderID>
<OrderDate> </OrderDate>
<OrderAmount></ OrderAmount >
<ShipTo>
<CompanyID> </CompanyID>

<AddressLine1> </AddressLine1>
<AddressLine2> </AddressLine2>
<AddressLine3> </AddressLine4>
<Zip> </Zip>
</ShipTo>
<ShipFrom>
<CompanyID> </CompanyID>
<AddressLine1> </AddressLine1>
<AddressLine2> </AddressLine2>
<AddressLine3> </AddressLine4>
<Zip> </Zip>
</ShipFrom>
</Order>

For this example, the Order schema has been built with Order Header nodes and the <ShipTo> record. The following steps outline how to create a complex type to be the data type for the <ShipTo> and <ShipFrom> addresses. You will model the data type of the existing <ShipTo> record.

  1. Open the project that contains the schema.

  2. Double-click the schema (the Order schema in this example) to open it, as shown in Figure 1.

    Figure 1. Order schema
  3. Click the existing record on which you want to base the complex type (the <ShipTo> record in the Order schema in this example).

  4. In the Properties window, click Data Structure Type, and type Address in the box. This step will now automatically recognize the record as a complex data type.

Now you can reuse the complex type. For example, here are the steps to create a record that uses the sample complex type:

  1. Click the Order schema node.

  2. Right-click and select Insert Schema Node => Child Record. Type the record name ShipFrom.

  3. In the Properties window of the newly created ShipForm child record, click Data Structure Type, and select the complex type that is now available, Address.

This procedure creates the Address complex type element structure under the ShipFrom record. A sequence instruction is created under both the ShipFrom and ShipTo records to implement the complex type. Figure 2 shows the finished schema.

Figure 2. Order schema with the Address complex type

3. How It Works

The example demonstrated creating a complex type data type based on an existing schema record within the schema. By XSD definition, a complex type is an element (record) that has child elements or attributes. Complex types can be used to implement custom schema rules and XSD data structure considerations for records, elements, and attributes. For example, you might use complex data types for validation rules via XSD regular expressions, schema cardinality, and order. In addition, you can make data type references to your complex types, allowing you to reuse record structures and XSD implementations.

A complex type is derived from the base data type anyType; that is, in the purest form, a complex type is in essence a stand-alone base type, in which you can define your own XSD structure representation and schema rules.

NOTE

A simple type is an element that in itself is defined and does not have children. For example, you might have a simple type named Order ID, which has a length limit of six and must start with an A character. In this instance, an XSD length restriction could be defined, along with a regular expression to check that the order starts with the letter A: <OrderID> Axxxxx </ OrderID>.

Other -----------------
- Windows Server 2008 High Availability : Load Balancing (part 2) - Load-Balancing Hardware & Load Balancing and SharePoint Farm Topology
- Windows Server 2008 High Availability : Load Balancing (part 1) - Load-Balancing Software
- Windows Server 2003 : Troubleshooting Internet Connectivity (part 2) - Verifying the Computer’s Network Settings
- Windows Server 2003 : Troubleshooting Internet Connectivity (part 1) - Identifying the Specific Networking Issue
- Exchange Server 2010 : Securing Windows for the Edge Transport Server Role
- Exchange Server 2010 : Edge Transport Server Connectors
- BizTalk 2010 Recipes : Creating Envelopes to Split Inbound Data
- BizTalk 2010 Recipes : Referencing Schemas
- BizTalk 2010 Recipes : Importing Schemas
- BizTalk 2010 Recipes : Creating Property Schemas
- Windows Server 2008 Server Core : Managing System Users - Obtaining User Login Information with the QUser Utility
- Windows Server 2008 Server Core : Managing System Users - Obtaining Session Status Information with the Query Utility
- Windows Server 2008 Server Core : Managing System Users - Managing Group Policies with the GPUpdate Utility
- SharePoint 2010 : Testing Office Web Apps Functionality (part 2)
- SharePoint 2010 : Testing Office Web Apps Functionality (part 1)
- Exchange Server 2010 SMTP Connectors
- Exchange Server 2010 : Transport-Level Security Defined
- Exchange Server 2010 : Exchange Server-Level Security Features
- SharePoint 2010 PerformancePoint Services : Time Intelligence (part 3) - STPS Example
- SharePoint 2010 PerformancePoint Services : Time Intelligence (part 2) - STPS Syntax
 
 
Most view of day
- Managing Windows Licensing and Activation : Managing Volume License Activation (part 2) - Leveraging MAK activation, Comparing KMS and MAK activation
- Microsoft Visio 2010 : Importing Graphics (part 5) - Importing AutoCAD Drawings - Inserting an AutoCAD File
- Microsoft Visio 2010 : Visualizing Your Data - Creating Data Graphic Legends
- Microsoft Access 2010 : Creating Relationships Between Tables
- Accessing and Using Your Network : Collaborating with Windows Meeting Space (part 1)
- Microsoft Exchange Server 2010 : Working with SMTP Connectors, Sites, and Links (part 5) - Configuring Send Connector DNS Lookups, Setting Send Connector Limits
- Windows Phone 8 : Working with the Windows Phone Software (part 9) - Copying Phone Content to Your PC or Tablet
- Windows Server 2012 : Implementing DNSSEC (part 1) - Benefits of DNSSEC, DNSSEC in previous Windows Server versions
- Using Voice and Sounds : Directing Your Computer with Voice Commands, Dictating Text
- Microsoft Exchange Server 2013 : Mailbox management - Discovery mailboxes - Creating additional discovery mailboxes
Top 10
- Windows Phone 8 : Scheduled Tasks - Scheduled Task API Limitations
- Windows Phone 8 : Scheduled Tasks - Updating Tiles Using a Scheduled Task Agent
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 5) - Editing an Existing To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 4) - Creating the To-Do Item Shell Tile, Saving a To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 3) - Debugging Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 2) - TodoService, TodoItemViewModel
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 1) - TodoItem,TodoDataContext
- Windows Phone 8 : Scheduled Tasks - Using Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- Windows Phone 8 : Windows Phone Toolkit Animated Page Transitions - Reusing the Transition Attached Properties
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro