newtelligence poweredRSS 2.0
# Friday, December 26, 2008

For the first time in almost a year, I had to do some BizTalk development (actual BizTalk development, not the support tool I wrote about previously) to support our old system. We were making a change to one of our schemas, but need to send a message that conforms to the original schema version on one of our send ports. The easiest way I could think on how to accomplish this, would be to add a map on the send port that transforms the message from the new schema to the old schema. Seeing as I’m was a little rusty on my BizTalk dev skills, this took a little longer then expected.

First, the schema I was dealing with had an element comprised of child elements, whose Group Order Type property got changed to sequence. This resulted in errors such as “Element E1 has unexpected child element E2 in Schema, list of possible elements include E3”. It would be nice if the error message was a little more clear. I even ran the schema thru a web based XML validator I found and got the same error message, so that must an error message in the XML spec. I finally figured out what was going on by looking at a sample XML message created using the Generate Instance fucntion and saw that only 1 of my “required” elements was showing up. Changed the Group Order Type to sequence fixed my problem.

With my test message passing the schema validation, I moved on to creating the map. I created a new assembly to hold the map, as well as the destination schema type. I then referenced my existing assembly to get the source schema for my map. This was pretty straight forward, and I was able to build and deploy my updated and new assemblies to BizTalk. Trying to keep things simple I set up 1 receive port/location and 2 send ports along with some content based routing. On one send port, I applied my map, and the other I did not. After sending a test message thru, I saw that both my send ports produced a file, but neither were transformed as expected.

Turns out I forgot to set the receive pipeline to XMReceive…I know I’m a bit of a BizTalk newbie sometimes. You do not need to change the pipeline from pass-thru on the send port, just on the receive location. After correcting this, my message suspended out with the error: “Cannot locate document specification because multiple schemas matched the message type http://Fully.Qualified.Schema#RootNode.” This makes sense, as all I did was copy/paste my original schema to the new schema file to preserve the existing structure, and then modified the original file, adding my new elements. I also needed to modify the schema on the new version, indicating a new version (which we happen to include as part of the namespace).

At this point things started working as I had originally envisioned. BizTalk is not something I can quickly jump back into for some reason. There is a bit of ramp up time to get back into the swing of things. I should probably go find some more BizTalk stuff to fix while I’m in the right frame of mind.

Friday, December 26, 2008 11:05:05 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
BizTalk
Comments are closed.
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Copyright 2010
Adam Salvo
Sign In
Statistics
Total Posts: 234
This Year: 13
This Month: 1
This Week: 0
Comments: 34
Themes
Pick a theme:
All Content 2010, Adam Salvo
DasBlog theme 'Business' created by Christoph De Baene (delarou)