Answered Dynamically Set WCF Service in Itinerary

  • Wednesday, March 16, 2011 1:38 PM
     
     

    Hi,

    I am using BizTalk 2010 and ESB Toolkit.

    I have created 2 itineraries to call 2 different wcf service. I am using UDDI3 to resolve these services. Then I have used Business Rule Composer to create a rule to dynamically set the itinerary name as per the Context Message Type. This works perfectly right.

    Now In my above case, both the itineraries are same except the Service Key value of the Resolver. Now is there any way to use only one itinerary rather than two and set the Service dynamically? It means setting Service Key value dynamically or any other way.


    Ayaz Shaikh

All Replies

  • Thursday, March 17, 2011 6:47 AM
     
     Answered

    Hi,

    I have analyzed and found the solution. I have followed the below steps.

    1.  I have created only one itinerary to call 2 different WCF service.

    2.  In this itinerary, I have used BRE Resolver Extension instead of UDDI3 Resolver.

    3.  Then I have created one Policy using Business Rule Composer.

    4.  In this policy I have created 2 business rules for 2 different WCF Services. In condition I have checked the ContextMessageType. If message contains perticular action then first rule will be executed else second.

    5.  In first rule I have set the information like Transport Type, Target namespace, WCF Action and Target location of one WCF Service. In the second rule I have set the same information but for second WCF Service.

    6. Now I have set this Policy name in the BRE Resolver of the itinerary.

    Now whenever message arrives policy get execute and run the rule as per the action in the message. Now it works with one itinerary but two different WCF Services.


    Ayaz Shaikh
  • Monday, June 18, 2012 7:43 AM
     
     

    Hi Mohammed Ayaz Shaikh

    that is exactly what i need but i dont know how to it.

    in Set end point outbound transport location  i say my service http://localhost/subscriptor/wcfMEL.service1,scv that ok

    in Set end point outbound type to WCF-WSHttp

    in Set end point target Namespace y type that appears in my wsdl http://tempuri.org/Imports

    in Set end point WCF action the name of my method SetData

    it looks fine for me, but i doesnt work because http://tempuri.org/Imports/SetData is invalid or unrecognized..

    So i dont know how call my wcf service ¿coul yo tell me what its wrong?

    Another thing how can i call to my wcf service with parameters?

    Thank

    MEL