none
BizTalk 2010 DB2 Dynamic Send Port RRS feed

  • Question

  • Hi guys,

    the last few days I tried to set up a dynamic send port for DB2. However to put it mildy; it did not work out as I thought it would. 

    Some Background info:
     BizTalk Server 2010
     HIS 2010 Installed (not configured)
     BizTalk 2010 CU2 installed (both for BTS and the adapter pack)
     HIS 2010 CU1 installed
     Standard DB2 Send/receive ports work without any problems
       
     
    Description:
    The problems started when I tried to set the DB2 context properties; these were standard not available. So I referenced:

    Microsoft.HostIntegration.Adapters.MsDb2.PropertySchemas.dll (found in: \Program Files\Microsoft Host Integration Server 2010\system") This fixed the issue of not being able to access the db2 properties required to dynamically configure the Db2 port.

    Building and deploying the BizTalk solution went without any problems. However the next problem arose when I tried to start the application which included the orchestration

    (referencing the MsDb2.PropertySchemas.dll). BizTalk simply refused enlisting the orchestration as it stated that:

    Could not enlist orchestration 'Orchestrations.DB2_DataSelection,Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a615f8859e66789c'. Could not enlist orchestration 'Orchestrations.DB2_DataSelection,Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a615f8859e66789c'. FileNotFoundException exception occurred

    while the XLANG/s runtime enlisted a service. Error message:Could not load file or assembly 'Microsoft.HostIntegration.Adapters.MsDb2.PropertySchemas, Version=7.0.2300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Well at that point I checked the GAC and noticed that the mentioned assembly was not in the GAC; so I manually added it to the GAC using gacutil -i . Once the dll was GAC-ed I was able to enlist the orchestration and start testing.

    At this point I thought everything would would, however I was wrong. During testing I received the following warning message:

    The adapter "DB2" raised an error message. Details "The value specified for parameter 'ConnectionString' is either empty or is not valid".

    Well I've checked all information which I set dynamically in my orchestration, and there I see that all DB2 properties are set at runtime; however it seems that they are lost

    once I actually send out the message using the Dynamic Port. My feeling tells me that something is most likely not registered within BizTalk (guessing the db2 property schema) as I had to perform all these fixes to get the orchestration deployed and enlisted.

    Below some snippets with regards to the DB2 Dynamic Port configuration:

    msgDb2DynamicRequest(DB2.ConnectionString) = db2ConnectionString;
    msgDb2DynamicRequest(DB2.DocumentTargetNamespace) = "http://REMOVED/schemas/db2/dynamic/select/v1.0";
    msgDb2DynamicRequest(DB2.ResponseRootElementName) = System.String.Format("{0}Response",msgInbound.msgDataRetrievalRequest.Request.DataRetrievalType);

    And below the connection string in question (note I replaced the sensive info with xxxxxxx) (I've verified it, by copying it to notepad and saving it as an udl and subsequently used it within the HIS2010 Data Access Tool)

    Provider=DB2OLEDB;User ID=XXXXXX;Password=XXXXXX;Initial Catalog=XXXXXXXX;Network Transport Library=TCPIP;Host CCSID=37;PC Code Page=1252;Network Address=xxx.xxx.xxx.xxx;Network Port=446;Package Collection=NULLID;Process Binary as Character=False;Units of Work=RUW;DBMS Platform=DB2/AS400;Use Early Metadata=False;Defer Prepare=False;DateTime As Char=False;Rowset Cache Size=0;Datetime As Date=False;AutoCommit=True;Authentication=Server;Persist Security Info=True;Cache Authentication=False;Mode=Read;Connection Pooling=False;Derive Parameters=False;

    Actually I tried leaving ouy the Provider as well, however same error.

    Please note:
    1) Tried repairing the BizTalk Installation
    2) Tried reparing the HIS installation
    3) Removed the HIS Installation and reinstalled
    4) Installed everything on a clean server

    In all of the above mentioned scenario's I was able to reproduce this issue with Dynamic Send Ports

    Anyway I was simply wondering if someone is aware of this issue, or has encountered it. If you've encountered it; did you manage to fix it and if you did how did you fix it. If you have not encountered it, maybe you have time and can reproduce this issue; or even better; You noticed that I did something wrong and can tell me how to fix it.

    From the past I remember there was an issue in BizTalk 2006 with dynamic send ports, but I hope that it did not resurface in BizTalk 2010.

    Below the setting in the database table 'adm_Adapter':

    column InboundTypeName value:
    Microsoft.HostIntegration.Adapters.MsDb2.Runtime.MsDb2Receiver, Microsoft.HostIntegration.Adapters.MsDb2.Runtime, Version=7.0.2300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

    column OutboundTypeName value:
    Microsoft.HostIntegration.Adapters.MsDb2.Runtime.MsDb2Transmitter, Microsoft.HostIntegration.Adapters.MsDb2.Runtime, Version=7.0.2300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

    Column PropertyNameSpace value:
    http://schemas.microsoft.com/DB2

    TIA


     

    Tuesday, February 14, 2012 8:28 PM

Answers

  • Jimmy,

    the error you got 'The adapter "DB2" raised an error message. Details "The value specified for parameter 'ConnectionString' is either empty or is not valid"' is correct.

    Reason: Your are setting the DB2 Context properties at the beginning of your orchestration when constructing your empty DB2 Request message. Subsequently you send this message to the BRE, which I reckon, returns your query to execute. Once you got the response back from the BRE you forward it directly to the db2 adapter.

    As you are re-using the response received from the BRE (same message); you have lost your DB2 Context properties you set earlier. In order to resolve this issue I suggest you modify your orchestration as follows:

    1. REMOVE The logic where you set the DB2 Context properties and where you configure your DYnamic Send Port (First Message Assignment shape in your orchestration)
    2. Create a new message, assign it the same message type, as the DB2 request message; and name it  "msgDb2DynamicRequestBreEnriched"
    3. Add a construct message shape after the 'Call Rules' shape. Set the message to create to msgDb2DynamicRequestBreEnriched
    4. Within this shape add a message assignment shape. At the followng logic to this shape:
     //Copy over contents (as returned from BRE)
    msgDb2DynamicRequestBreEnriched.msgDb2DynamicSelectionRequest = msgDb2DynamicRequest.msgDb2DynamicSelectionRequest;
    
    //Set DB2 Context properties
    msgDb2DynamicRequestBreEnriched(DB2.ConnectionString) = <ADD CONNECTION STRING>;
    msgDb2DynamicRequestBreEnriched(DB2.DocumentTargetNamespace) = <ADD TARGET NAMESPACE>;
    msgDb2DynamicRequestBreEnriched(DB2.ResponseRootElementName) = <ADD RESPONSE ROOT NAME>;
    
    //Configure the DYnamic Port
    prtDynamicDataSelectionDb2(Microsoft.XLANGs.BaseTypes.Address) = <Add DB2 Connection URI>;
    prtDynamicDataSelectionDb2(Microsoft.XLANGs.BaseTypes.TransportType) = "DB2";
    

       5.  Now go to your send shape, and change the message from msgDb2DynamicRequest to msgDb2DynamicRequestBreEnriched


    Now build, deploy and test your solution.

    Good luck and if this solves your issue please Indicate "Mark as Answer" if this Post has Answered the Question

    • Proposed as answer by Rene BrauwersMVP Wednesday, February 15, 2012 12:17 PM
    • Marked as answer by jpreston77 Wednesday, February 15, 2012 3:18 PM
    Wednesday, February 15, 2012 12:04 PM

All replies

  • Hi,

    well I don't have any problems using Dynamic Send port using the DB2 adapter; I guess it has something to do with the way you set things up in your orchestration. Would it be possible for you to send me your code? If so you can send it to info@brauwers.nl

    Cheers

    René

    Wednesday, February 15, 2012 8:53 AM
  • Rene,

    I've send you an email.

    Thx

    Jimmy

    Wednesday, February 15, 2012 10:33 AM
  • Jimmy,

    the error you got 'The adapter "DB2" raised an error message. Details "The value specified for parameter 'ConnectionString' is either empty or is not valid"' is correct.

    Reason: Your are setting the DB2 Context properties at the beginning of your orchestration when constructing your empty DB2 Request message. Subsequently you send this message to the BRE, which I reckon, returns your query to execute. Once you got the response back from the BRE you forward it directly to the db2 adapter.

    As you are re-using the response received from the BRE (same message); you have lost your DB2 Context properties you set earlier. In order to resolve this issue I suggest you modify your orchestration as follows:

    1. REMOVE The logic where you set the DB2 Context properties and where you configure your DYnamic Send Port (First Message Assignment shape in your orchestration)
    2. Create a new message, assign it the same message type, as the DB2 request message; and name it  "msgDb2DynamicRequestBreEnriched"
    3. Add a construct message shape after the 'Call Rules' shape. Set the message to create to msgDb2DynamicRequestBreEnriched
    4. Within this shape add a message assignment shape. At the followng logic to this shape:
     //Copy over contents (as returned from BRE)
    msgDb2DynamicRequestBreEnriched.msgDb2DynamicSelectionRequest = msgDb2DynamicRequest.msgDb2DynamicSelectionRequest;
    
    //Set DB2 Context properties
    msgDb2DynamicRequestBreEnriched(DB2.ConnectionString) = <ADD CONNECTION STRING>;
    msgDb2DynamicRequestBreEnriched(DB2.DocumentTargetNamespace) = <ADD TARGET NAMESPACE>;
    msgDb2DynamicRequestBreEnriched(DB2.ResponseRootElementName) = <ADD RESPONSE ROOT NAME>;
    
    //Configure the DYnamic Port
    prtDynamicDataSelectionDb2(Microsoft.XLANGs.BaseTypes.Address) = <Add DB2 Connection URI>;
    prtDynamicDataSelectionDb2(Microsoft.XLANGs.BaseTypes.TransportType) = "DB2";
    

       5.  Now go to your send shape, and change the message from msgDb2DynamicRequest to msgDb2DynamicRequestBreEnriched


    Now build, deploy and test your solution.

    Good luck and if this solves your issue please Indicate "Mark as Answer" if this Post has Answered the Question

    • Proposed as answer by Rene BrauwersMVP Wednesday, February 15, 2012 12:17 PM
    • Marked as answer by jpreston77 Wednesday, February 15, 2012 3:18 PM
    Wednesday, February 15, 2012 12:04 PM