Issue/Scenario:
I have a new application that I’m building. I have for example three projects, App.Common, App.In, and App.Out.
We have a somewhat debatable policy of keeping one app separate from the others and almost no application cross-references (still on BizTalk 2010 – but in 2013 this is supposed alleviated, partially or in whole).
I had a web service schema copied in to App.Out. And I developed the proof of concept in App.Out.
Now, it turns out we have about 6 output messages. There was a also some debate as to whether they should go in the single AppOut project, or in six different projects (App.Out1, App.Out2, etc…). The architect wanted the second approach, so different developers could be assigned to each one in order to possible meet a tight development deadline.
Now, I don’t want that same web service schema to be deploy 6 times in the same application. So I moved the schemas to the App.Common. And of course the map doesn’t compile because I change the location of the schemas.
Solution
I was afraid I was going to have to do map surgery, but it turns out I could just re-reference the schema in the map. Since the schema and nodes are the same, none of the mapping was lost.
Internals of the Map
I was afraid I was going to have to do map surgery, but it turns out I could just re-reference the schema in the map. Since the schema and nodes are the same, none of the mapping was lost.
But for fun, if I had to do map surgery, this is chat change. The Original “Before” is on top, and the “After” is on the bottom”.
NOTE: When you open a map there are no line breaks. I use the XML tools in NotePad++ to format the XML (but don’t save it after formatting, always do the formatting on a copy).
You can see below how the “Reference Location” attribute changed.
I’m mapping from our Canonical schema to an internal web service schema.
<pre>
<SrcTree RootNode_Name="Canonical_DATA">
<Reference Location="CanonicalArtifacts.Schemas.MY_CANONICAL_SCHEMA_V4" />
</SrcTree>
<TrgTree RootNode_Name="OrderUpdateHeaderByMessageID_New">
<Reference Location="SchemasWebSvc\B2BData_tempuri_org.xsd" />
</TrgTree>
</pre>
<pre>
<SrcTree RootNode_Name="Canonical_DATA">
<Reference Location="CanonicalArtifacts.Schemas.MY_CANONICAL_SCHEMA_V4" />
</SrcTree>
<TrgTree RootNode_Name="OrderUpdateHeaderByMessageID_New">
<Reference Location="AppOut.SchemasWebSvc.B2BData_tempuri_org" />
</TrgTree>
</pre>