Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

BizTalk 2010 Recipes : Creating Simple Document Schemas

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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)
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server