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

BizTalk 2010 Recipes : Creating Simple Document Schemas

3/25/2011 10:05:08 PM

1. Problem

As part of your business process or messaging solution, you need to create an XML schema from scratch. You can't generate a schema based off of an existing XML document, as this schema represents data that has not been modeled before.

2. Solution

The following steps outline how to create a simple schema and add it to your BizTalk project.

  1. Open an existing project or create a new project in Visual Studio.

  2. As shown in Figure 1, right-click the project name in the Solution Explorer and select Add => Add New Item.

    Figure 1. Adding an item from the Solution Explorer
  3. The Add New Item dialog box will appear, as shown in Figure 2. Select Schema as the type of item, type in a name for the item, and click OK.

    Figure 2. Add New Item dialog box
  4. To change the name of the root node, right-click the node, and select Rename.

  5. To add nodes, right-click a node, and select Insert Schema Nodes. Then select from the following options, as shown in Figure 3:

    • Child Record, to add a new record indented one level from the selected node

    • Child Field Attribute, to add a new attribute node indented one level from the selected node

    • Child Field Element, to add a new element node indented one level from the selected node

    • Sibling Record, to add a new record node at the same level of the selected node

    • Sibling Field Attribute, to add a new attribute node at the same level of the selected node

    • Sibling Field Element, to add a new element node at the same level of the selected node

    Figure 3. Adding schema nodes
  6. Select a node to view and modify its properties.

3. How It Works

XML schemas are the foundation of all scenarios and document exchanges with BizTalk Server. Once you have created your schema, you can create your scenario. Whether it is a pure messaging solution or involves business process automation scenarios implemented as orchestrations, the schema is available to all other projects and solutions simply by referencing it. Additionally, once you have created your schema, you can generate instances of the document that will adhere to the schema definition. This feature makes it very easy to create test data.

To generate a test instance, follow these steps:

  1. Open the schema Properties, shown in Figure 4, by right-clicking the schema in the Solution Explorer and selecting Properties.

    Figure 4. Schema Properties
  2. Type a path and file name next to Output Instance Filename, or select the ellipsis to use the common file dialog box to browse to a file location and name the file. Then click OK.

  3. Right-click the schema, and select Generate Instance. A test instance of the document will be created and named based on the Output Instance Filename property specified.

Similarly, BizTalk Server provides the ability to validate that an instance of a document adheres to a schema definition. To validate an instance, follow these steps:

  1. Open the schema Properties by right-clicking the schema name in the Solution Explorer and selecting Properties.

  2. Type a path and file name next to Input Instance Filename, or select the ellipsis to use the common file dialog box to browse to a file location and select a file. Then click OK.

  3. Right-click the schema, and select Validate Instance. The document specified in the Input Instance Filename property will be validated against the schema.

Other -----------------
- Restoring Windows Server 2008 (part 2) - Restoring Individual Components
- Restoring Windows Server 2008 (part 1) - Full Server Recovery
- Installing and Configuring Office Web Apps for SharePoint 2010 (part 2)
- Installing and Configuring Office Web Apps for SharePoint 2010 (part 1)
- Office Web Apps Integration with SharePoint 2010 : Planning for Office Web Apps Use
- Windows Server 2008 R2 : Planning Domain Group Policy Objects (part 2)
- Windows Server 2008 R2 : Planning Domain Group Policy Objects (part 1) - Policies and Preferences
- Windows Server 2008 R2 : Planning Workgroup and Standalone Local Group Policy Configuration
- Exchange Server 2010 : Components of a Secure Messaging Environment (part 3) - Using Email Disclaimers
- Exchange Server 2010 : Components of a Secure Messaging Environment (part 2)
- Exchange Server 2010 : Components of a Secure Messaging Environment (part 1) - Hardening Windows Server 2008
- Considering the Importance of Security in an Exchange Server 2010 Environment
- Installing BizTalk Server RFID 2010
- BizTalk Server 2010 : Configuring EDI Trading Partners
- BizTalk Server 2010 : Accessing the EDI Version 5010 HIPAA Schemas
- Exchange Server 2010 : Managing Recipients and Distribution Groups (part 2) - Distribution Groups
- Exchange Server 2010 : Managing Recipients and Distribution Groups (part 1) - Mail Contacts & Mail-Enabled Users
- Exchange Server 2010 : Resources and Shared Mailboxes
- Windows Server 2003 : Monitoring Network Performance (part 3)
- Windows Server 2003 : Monitoring Network Performance (part 2) - Performance Console Differences
 
 
Most view of day
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Adding Password Protection to a Workbook
- Developing Disk Images : Editing a Build’s Task Sequence
- BizTalk 2010 : ASDK SQL adapter examples (part 4) - Composite Operations
- Windows Server 2003 on HP ProLiant Servers : Active Directory Logical Design - Replication Topology (part 3) - Designing an Efficient Replication Topology
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 5) - Using iSCSI Initiator - Discovering targets
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting Privacy Options - Set Parental Controls for Online Research
- Windows Server 2003 on HP ProLiant Servers : Server Placement (part 2) - DC Placement, GC Placement
- BizTalk Server 2006 : Starting a New BizTalk Project - Organizing Artifacts in BizTalk 2006
- Workflow in Dynamics AX : Dynamics AX 2009 Workflow Infrastructure
- SQL Server 2012 : Understanding Latches and Spinlocks (part 1) - Latching Example
Top 10
- Microsoft Lync Server 2013 : Director Troubleshooting (part 3) - Synthetic Transactions,Telnet
- Microsoft Lync Server 2013 : Director Troubleshooting (part 2) - DNS Records, Logs
- Microsoft Lync Server 2013 : Director Troubleshooting (part 1) - Redirects, Certificates
- Microsoft Lync Server 2013 : Administration of the Director Role (part 4) - Services Management, Client Version Filter
- Microsoft Lync Server 2013 : Administration of the Director Role (part 3) - Topology Status
- Microsoft Lync Server 2013 : Administration of the Director Role (part 2) - Ports,Firewall Rules
- Microsoft Lync Server 2013 : Administration of the Director Role (part 1) - Services
- Microsoft Lync Server 2013 : Configuring the Director (part 2) - Web Services Ports,Reverse Proxy
- Microsoft Lync Server 2013 : Configuring the Director (part 1) - SRV Records, Web Services FQDN Overrides
- Sharepoint 2013 : SharePoint Designer 2013 (part 2) - Locking Down SharePoint Designer
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro