Sunday, June 01, 2008

ESB Guidance: Get Map from UDDI

Inside ESB Guidance, we can use UDDI to get TransportType, TransportLocation, ... and also we can get from UDDI the Map to apply.

First of all, we have to insert an UDDI service, with TransformType property and the value of the map that we will want to apply (map name and assembly), for example:



In previous example, I have setted the value "TransformType://GlobalBank.ESB.DynamicResolution.Transforms.SubmitOrderRequestNA_To_SubmitPurchaseOrderRequestCN,GlobalBank.ESB.DynamicResolution.Transforms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2c8b2b87f54180a".

Next, we add a Receive Location and use a Receive Pipeline with a ESB Dispatcher Disassembler Component, for example. We set the component's MapName property, to our UDDI service connection string, for example:

UDDI:\\serverUrl=http://localhost/uddi;serviceName=MyService;serviceProvider=MyProvider

Finally, we have to do a little change inside the ESB's resolver UDDI class (Microsoft.Practices.ESB.Resolver.UDDI.ResolveProvider). Inside the CopyResolution method, add inside the try block this line:

if (!string.IsNullOrEmpty(source.TransformType)) destination.TransformType = source.TransformType;

Now, we can use UDDI to get the transformation to apply.

No comments: