WSE 2&3, Biztalk and VS 2005 Web App Projects
I previously posted about message serialization issues while testing out a particular WSDL. One thing i found out from their documentation was that they use Web Service Security. It initially set some alarm bells ringing because i immediately thought of using WSE3 and remembered that there is no out of the box adapter for Biztalk 2006 to use that. Of course, if we could justify the cost to the client, then we could purchase the third party adapters but lets just say that making such a business case isnt very easy. Further, its only a UserName token required and we dont need any of the other WSE infrastructure so the purchase option looked even more distant.
Anyway, one good thing i found is that the Biztalk WSE2 Adapter SP1 works for both v2004 and v2006. The last time i worked with WSE (v2) and that adapter was over a year ago so i decided to refresh my memory and try out a sample project. Since i already had the WSDL and had worked out some simple consumers as i indicated in my previous post, i thought it would be a good idea to WSE enable the service and then try to consume it from Biztalk.
The first thing i installed was WSE 2 SP3. Apparently it works fine with VS2005 but there is no design time support in the IDE. That meant i would have to go down the WSE3 route and that was a bit of a blow since in the back of my mind there was an association that WSE2 Adapter only talks to WSE 2 enabled services, so enabling a service with WSE3 wouldnt really help me.
Anyway, I then installed WSE3, started up my project, launched the Settings tool inside the IDE and lo and behold, the check box labelled “Enable Microsoft Web Services Enhancements Soap Protocol Factory” was greyed out. Further, when i checked the option “Enable this project for WSE”, it proceeded to create an app.config file instead of placing stuff in my web.config. Curiouser and curiouser. So after much digging around i stumbled on an MSDN forum post here where the moderator, Mark Fussell said
“The Visual Studio 2005 Web Application Projects (RC1) project type does not work with the WSE 3.0 integrated Visual Studio configuration tool. To use WSE 3.0 with the Visual Studio 2005 Web Application Projects (RC1) type you have to use the configuration tool standalone, launching this by; Start-> All Programs-> Microsoft WSE 3.0-> Configuration Tool and then loading with the app.config file or the web.config file depending on the type of project.”
Well, how do you like that? The Web Application Projects has now been an official part of VS2005 (from SP1) but no change to WSE support, but thats probably because of the focus on WCF.
So, i have now started to use the external config editor. Basically all i am attempting is a POC to connect Biztalk to a service expecting the WS-Security UserName mechanism. I am assuming that when i get back to office and try to connect to the java WS it should still work. Perhaps thats a leap of faith ?
I also think, that the whole WSE2 and WSE3 adventure today could just be a red herring. Maybe what matters is the version of WS-Security that they have implemented and it is that which decides whether Biztalk will choke on consuming the contract. (I somehow doubt that because there isnt anything in the WSDL that makes a difference and pointing Biztalk at my local WSDL didnt throw up any problems . AFAIK WS* is all external to the WSDL and the policy files control these settings.
I’ll find out for sure in a couple of days. but if anyone has some pointers or knows of any gotchas in linking BTS with third party web services requiring WS-Security (and if the adapter makes any difference) please let me know. It would save a lot of time.
[UPDATE: 25th October 2008]: its been a while since I posted this entry but as i have had questions on this post and what we did with WSE finally, i thought it would be good to update it with the following info
(1) The work-around for the lack of IDE integration is to use the external configuration editor. This works for both WSE2 SP2/SP3 and WSE3.
(2) While calling the webservice, a colleague (who did the final implementation) decided to use a custom pipeline component (send side) to handle the WS-Security related elements.
(3) We finally went with WSE2 rather than WSE 3 (Its been so long, i dont remember why 🙂 ]