Monday, February 25, 2013

ESB Toolkit 2.1: Default Resolver Service Url Property

Not a biggie, but I couldn't find an answer to this on the net, so I thought I'd write about it...

A while ago I was doing some work with the BizTalk ESB Toolkit 2.1, creating a LOT of itineraries in the Visual Studio itinerary designer. Naturally, I'd chosen to live in a world of pain and not install the ESB Toolkit web services into the "Default Web Site" living at port 80 in IIS (I know, who would ever want to do that!). Instead, I'd installed them to my own "ESB Site", living on port 82.

Unfortunately, the Visual Studio itinerary designer defaults the Resolver Service Url property assuming you've deployed the ESB web services to port 80 - the default value for this property is "http://localhost/ESB.ResolverServices.WCF/ResolverService.svc" . This meant that for each itinerary I created in the designer, I needed to manually change the Resolver Service Url property to  "http://localhost:82/ESB.ResolverServices.WCF/ResolverService.svc" instead.


Yea, I know, not a big deal, but it irked me that it wasn't smart enough to realise I'd deployed the services to port 82. I held out hope that there was something I was missing - some magic config setting or Registry key I'd missed that set the default value for this property. At the time I didn't have enough bandwidth to investigate any further, until recently...

And the answer is... It looks like this can't be changed, the default value for the property is set via a DefaultValue attribute applied within the code itself... Leaping into ILSpy and disassembling the Microsoft.Practices.Services.ItineraryDsl.ItineraryModel.ResolverServiceUrl property within the Microsoft.Practices.Services.Itinerary.Dsl assembly, we can see the following:

[Editor(typeof(UrlEditor), typeof(UITypeEditor)), TypeConverter(typeof(TypeConverter)), DisplayNameResource("Microsoft.Practices.Services.ItineraryDsl.ItineraryModel/ResolverServiceUrl.DisplayName", typeof(ItineraryDslDomainModel), "Microsoft.Practices.Services.ItineraryDsl.GeneratedCode.DomainModelResx"), CategoryResource("Microsoft.Practices.Services.ItineraryDsl.ItineraryModel/ResolverServiceUrl.Category", typeof(ItineraryDslDomainModel), "Microsoft.Practices.Services.ItineraryDsl.GeneratedCode.DomainModelResx"), DescriptionResource("Microsoft.Practices.Services.ItineraryDsl.ItineraryModel/ResolverServiceUrl.Description", typeof(ItineraryDslDomainModel), "Microsoft.Practices.Services.ItineraryDsl.GeneratedCode.DomainModelResx"), DefaultValue("http://localhost/ESB.ResolverServices.WCF/ResolverService.svc"), DomainObjectId("07aaf7c2-0163-47fd-a118-57539e8d3eba")]
public string ResolverServiceUrl


Oh well... Anyway, I hope this saves someone some time performing the fruitless search I went through - or that someone can tell me I've missed something obvious and there is a way to change this default.