Santosh Benjamin's Weblog

Adventures with AppFabric, BizTalk & Clouds

WSE 2&3, Biztalk and VS 2005 Web App Projects

with 3 comments


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 🙂 ]

Advertisements

Written by santoshbenjamin

October 27, 2007 at 10:27 PM

Posted in Architecture, BizTalk

Tagged with , ,

3 Responses

Subscribe to comments with RSS.

  1. Hi Benji,

    Ive done quite a bit with the WSE 2 adapter and BizTalk 2006 & 2006 R2. It works ok, although we had some fun with Kerberos.

    Theres a couple of resources on my blog you might be interested in,

    1. Is a BizUnit test step for WSE2 so you can call a published wse 2 service in a similar way to the SoapHttpRequestResponse step. Note I said similar, it is not exactly the same model. (You could easily replicate this with WSE3, and I also have one for WCF if your looking at that)

    2. The BizTalk MsBuild Generator has an MsBuild task for automating the wse web service publishing wizard

    Also dont forget to set the soap action before calling a wse web service from BizTalk, I always forget to set that and get a parameter can not be null error.

    HTH
    Mike

    Mike

    July 10, 2008 at 10:56 PM

  2. Hi Santosh,

    Did you find out a workaround for this? We are currently on BizTalk 2006 and have a need to integrate with a WSE3.0 service and are looking for some ideas.

    Thanks…your blogs are good.

    Biztalk

    October 23, 2008 at 9:44 PM

  3. Hi,
    The workaround for lack of IDE integration is to use the standalone configuration editor. This works for both WSE2 and WSE3. As far as i can remember we didnt have any trouble with WSE2 SP3 in the project. (We didnt go for WSE3.. its been so long, i dont remember why anymore 🙂 )

    HTH,
    Benjy

    santoshbenjamin

    October 25, 2008 at 12:21 AM


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: