Tuesday, July 28, 2009

Itinerary Service For Messaging Extender

Step 1 - Creating a new Itinerary Service
Add Reference Microsoft.Practices.ESB.Itinerary from Microsoft BizTalk ESB Toolkit 2.0\Bin

implement Microsoft.Practices.ESB.Itinerary.IMessagingService.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.ESB.Itinerary;
using Microsoft.BizTalk.Component.Interop;
using Microsoft.BizTalk.Message.Interop;

namespace Sandbox.ESB
{
class LoggingService: IMessagingService
{
public IBaseMessage Execute(IPipelineContext context, IBaseMessage msg, string resolverString, IItineraryStep step)
{
throw new NotImplementedException();
}

public bool ShouldAdvanceStep(IItineraryStep step, IBaseMessage msg)
{
throw new NotImplementedException();
}

public string Name
{
get { throw new NotImplementedException(); }
}

public bool SupportsDisassemble
{
get { throw new NotImplementedException(); }
}
}
}






The following site http://msdn.microsoft.com/en-us/library/ee250158%28BTS.10%29.aspx explains each of the following methods that need to be implemented



Step 2 Add the Itineray Service to the ESB.config



<itineraryService id="00000000-0012-0004-1973-000000000001" name="Sandbox.ESB.Services.Logging" type="Sandbox.ESB.LoggingService, Sandbox.ESB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=354cb85f9213cd3b" scope="Messaging" stage="AllReceive"/>



Step 3



Now in visual studio drop a Itinerary Service, select the Itinerary Service Extender to be Messaging Messaging Extender...







When you go to chose the Service Name your Service should appear in the drop down list. If not it is possible that the ESB is configured to be using the SSO. Since the esb.config has changed, SSO does not automatically update itself. Go to Microsoft BizTalk ESB Toolkit 2.0\Bin\ESBConfigurationTool.exe and unconfigure and reconfigure SSO or just point to the file configuration source.