BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in BizTalk 2004

 
 
Page 17645 of 19364

Using XML schemas effectively within the BizTalk 2004 XSD Schema Editor

Blogger : Nigel Parkers Outside Line
All posts : All posts by Nigel Parkers Outside Line
Category : BizTalk 2004
Blogged date : 2005 Feb 11

I was reading this article http://devresource.hp.com/drc/slide_presentations/schemaWSDL/index.jsp and it got me thinking about how I have been designing schemas in BizTalk… Yes I know I can already hear your groans about the “BizTalk XSD schema editor”.

Well contrary to popular believe you don’t need to use monolithic structures in BizTalk schema design. From the BizTalk Server 2004 book… p78 – Building Message Specifications – Imports – “Only schemas that are part of the current project may be imported”… I thought I’d take on building the xsd structure described in the above article using Visual Studio armed with only the BizTalk Editor and the XML Schema Editor. TIP For those that don’t know you can still access the XML Schema Editor after BizTalk is installed by right-clicking on the XSD in Visual Studio and selecting Open With… see below.

First I built the Common Types schema. I did this using the XML Schema Editor initially and then opening it in the BizTalk Editor afterwards… the resulting schema is shown below.

CommonTypes.xsd

 <xml version="1.0" encoding="utf16">

<schema xmlns:qc="http://XMLImport.CommonTypes/supplier/quoteCommon" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://XMLImport.CommonTypes/supplier/quoteCommon" xmlns="http://www.w3.org/2001/XMLSchema">

<complexType name="OwnerDetails">

<attribute name="CustId" type="string" use="required"/>

<attribute name="CustName" type="string" use="required"/>

<attribute name="CustEmail" type="string" use="required"/>

complexType>

<complexType name="PartItemType">

<attribute name="SKU" type="string" use="required"/>

<attribute name="Descr" type="string" use="required"/>

<attribute name="Qty" type="int" use="required"/>

<attribute name="QuotedPrice" type="float" use="optional"/>

complexType>