WSS vs Ent Lib : Here's something I found really interesting. In our dev workstations we hadnt installed WSS and on one of the Win2003 servers which a colleague was using for development was free of WSS too. But one fine day when our official hardware arrived and we installed everything, we ran into an absolute nightmare in getting anything to work.
First of all WSS locked everything up so tight that we couldnt even debug a simple web service. And worse still we found Ent Lib crashing all over the place citing Manifest Errors in some vague internal components. We got round the debugging problem by forcing full trust on the server (yeah, i know, not good security practice, but then again, even in the live environment its going to be behind the firewall and besides working code is more important to me than locked down servers where nothing works !!)
So after setting the full-trust, debugging and Ent Lib both started working. Our joy was shortlived though when Ent Lib started complaining about manifest errors within a few hours. So i did the only thing left - namely uninstalled WSS. Then it was all fine and has been so for a few weeks now. No one in the Ent Lib forum seems to know about issues with WSS either. Im not totally chiffed with this cos I need to work with BAM and maybe BAS too but i guess i'll have to run the tracking portal on another box.
Dynamic Maps and Validations: I also got dynamic mapping working finally. There was an MSDN article on "Assigning Transforms Dynamically" which touched briefly on the method, but the code shown simply didnt work until I finally figured out what was happening and discussed it in the newsgroup (starting thread is : here ).The method i used is as follows
- Create two messages of type XmlDocument. They are for the input and output messages
- Get the input message from the appropriate port (using XmlReceive pipeline)
- Create a variable of type System.Type (which will hold the map)
- In an expression, do your logic which determines which map to use for the file. I had to write a custom helper which took the input file name and based on a pattern in the name, it looked up SSOConfig to find the name of the map and returned a System.Type variable to the orch.
- Load the map (fully qualified name and all that) - check out the MSDN article for this bit.
- Then put in a construct message shape and specify that you are constructing Message_2 (also of type XmlDocument)
- Now in a message assignment shape you can say "transform(Message_2) = MapName(Message_1)" .
- The transform method is an internal biztalk method. The problem with the MSDN article is that it shows all the code that would be seen when you open an ODX File in notepad so the code lines with the "construct" statement actually dont live in the assignment shape. They correspond to the CONSTRUCT MESSAGE shape.
- You need some error checking after this because it is possible to get back an empty XmlDocument after doing the mapping. I combined this orch with a schema Validator component to round it off.
Stephen Thomas has also posted an article and sample on dynamic mapping at his site and the BizTalkGurus site.
Another article (and code sample) which i found fascinating is titled How do I reuse BizTalk maps outside BizTalk ? . Gilles the author, is a genius. I think this technique can be used beautifully in conjunction with BizUnit 2.0 so that you dont need to go and test the maps individually. It can be placed along with a Schema Validation step to give us a really useful test.
Thats it for now. I hope someone finds this useful. There are some other interesting things which we are experimenting with and i will post them soon. For now I have to shift my attentions to Immediacy CMS. We are going to be using that for a couple of websites in the same project (as the BizTalk one) and my team mates and I just attended a couple of days of training at Poole, UK where the company is based. It is a fairly solid product (definitely a million times better than MCMS, but then again, so are a 100 other CMS products) and I look forward to building my sites with it and will keep y'all posted on the progress and outcome.
Happy coding , architecting, whatever!!!
Hi everyone. Its been a long long time since the last post. Had some malware on my home PC that wouldnt allow me to access the DNJ site and work was very hectic so i couldnt blog from there either. Finally got my PC cleaned a bit but Ad-Aware reports another 100 critical issues with it. Im gonna have to reinstall the box pretty soon.
By the way, do folks really like the new look of the DNJ blogs ? Unless theres something specifically wrong with my PC, i think it looks awful. The little boxes with menus in them appear to float around and the text is all around and under them. The old look was much cleaner (except for the posts with the HTML code in them)
Anyway, I am not just surfacing to whinge. I do have some interesting stuff to post and thats up next. Gotta keep the categories clean and separate!!