Logo
PREGNANCY
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
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
- Windows Server 2012 : Managing Users with Local Security and Group Policies (part 3) - Troubleshooting Group Policy Applications
- System Center Configuration Manager 2007 : Network Design - Network Discovery
- Microsoft Dynamics CRM 4 : Digital Phone Integration (part 2) - Cisco Unified CallConnector for Microsoft Dynamics CRM
- Windows Server 2012 : Configuring IPsec (part 6) - Configuring connection security rules - Creating a custom rule, Configuring authenticated bypass
- Microsoft Access 2010 : Creating a New Table Using Application Parts, Setting a Primary Key
- Microsoft PowerPoint 2010 : Incorporating Motion Video - Placing a Video on a Slide
- Windows Server 2012 Group Policies and Policy Management : GPO Administrative Tasks - Creating and Linking WMI Filters to GPOs
- Microsoft Word 2010 : Viewing a Document’s Statistics, Evaluating a Document’s Readability
- Windows Server 2003 on HP ProLiant Servers : File Replication Service Design and Implementation (part 2) - Diagnostics and Troubleshooting Methods and Tools
- Editing Digital Video with Windows Live Movie Maker (part 4) - Editing Your Video - Adding Transitions
Top 10
- Windows Phone 8 : Configuring Mailbox Settings (part 5) - Configuring Automatic Replies
- Windows Phone 8 : Configuring Mailbox Settings (part 4) - Lightening the Display,Changing the Mailbox Sync Settings
- Windows Phone 8 : Configuring Mailbox Settings (part 3) - Message Signatures, Blind CCing Yourself
- Windows Phone 8 : Configuring Mailbox Settings (part 2) - Unlinking Mailboxes, Conversation View
- Windows Phone 8 : Configuring Mailbox Settings (part 1) - Linking Mailboxes
- Managing Windows Server 2012 Systems : Configuring Roles, Role Services, and Features (part 6) - Tracking installed roles, role services, and features
- Managing Windows Server 2012 Systems : Configuring Roles, Role Services, and Features (part 5) - Installing components at the prompt
- Managing Windows Server 2012 Systems : Configuring Roles, Role Services, and Features (part 4) - Managing server binaries
- Managing Windows Server 2012 Systems : Configuring Roles, Role Services, and Features (part 3) - Adding server roles and features
- Managing Windows Server 2012 Systems : Configuring Roles, Role Services, and Features (part 2) - Installing components with Server Manager - Viewing configured roles and role services
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro