Automatically Generating Complex Types in BizTalk Schemas

I’m currently teaching a “BizTalk Developer” class for my colleagues and as usual, I learned something I didn’t know before. Maybe it’s common knowledge, but it was new to me.

Specifically, I never had figured out how to turn nodes in my schema into actual “complex types” to be used elsewhere. Let’s say I start with a “TrainingBooking” schema that validates messages from folks that are requesting training rooms for course delivery.

We’ll also assume that I want to build a “room” object that other schemas may want to reuse. My “room” schema may look like this …

Now I can import this “room” schema into my “booking” schema and reuse the defined types.

However, the only “types” available from that schema when looking at the Data Structure Type in my “booking” schema is the root type. What if I want the “room details” node from my schema instead?

What I just learned, was that if I go to my “room” schema, click my “room details” record node, and type in a value for the DataStructureType, then automagically, a “type” is created for me (see here for more details on creating global definitions).

Sweet. Now if I go back to my “booking” schema, the new “RoomDetailsType” is accessible.

I’ve had a lot of cases the past few months where I would have liked “real” complex types created, and now I know how. Learning is half the battle.

Technorati Tags:


Categories: BizTalk

5 replies

  1. I love a lot of aspects of the BizTalk Schema editor, one of them being the extremely useful tree visualization of the model (particularly good for those nasty, long standard schemas). I knew about this trick, and, like you, I sort of discovered it accidentaly; it is really not very intuitive, particularly if you’re used to writing schemas by hand 🙂

  2. Nice, thanks for sharing this!

  3. Hi Richard,
    Just when I thought all hope was lost trying to create a complex type in my schemas you come save the day with this excellent post.

    Many thanks!


  4. Thanks Richard, you saved me a valuable Sunday hour!

  5. And here I was, tired of exploring the properties window and context menus trying to create named comples types. Thanks a lot for the post..


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: