Testing a map when using the “Fixed” property on an element in your schema

by eliasen 25. oktober 2009 20:33

Hi all

Today I tried playing with the “Fixed” property that can be set on an element or an attribute in your schema. According to the documentation, this is then a value that MUST be present in the element.

image

So the mapper is actually quite down with this – you cannot map anything to the field that has a value in the “Fixed” property. And when expecting the XSLT that is generated by the mapper you will find, that the mapper simply inserts the correct and hard coded value into the field.

image

Great.

Now, I created some links in the map just to test it, and chose that the mapper should validate the input for my map, but not the output, since I hadn’t bothered dragging all the necessary links.

To my surprise I got this error:

   1:  Output validation error: The value of the 'MiddleNames' element does not equal its fixed value.

An error validating the output of the map… but this surely must be a mistake, because I turned validation of the output from the map off and besides; the value in “MiddleNames” cannot be wrong, because the mapper has put it there it self, taken from the schema. Very weird indeed.

Only after quite a search, did I discover that the error was in validation of the INPUT to the map and not the output. I had used the same schema as both input and output, and my input instance did not have the correct value since it was an old test instance.

But really… Microsoft… that error message could be better! :-)

Hope this helps someone.

--
eliasen

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List