Showing posts with label Biztalk Services. Show all posts
Showing posts with label Biztalk Services. Show all posts

Friday, 6 December 2013

BizTalk Value Cross Reference

If you dont have idea on Biztalk Cross Reference data. Please go through my previous blog on Biztalk Cross Reference

Value CROSS REFERENCE:

Scenario:

Field Common Value Application1 ID Application 2 ID Application 3 ID
Type tax TA Bounded ST

Solution:

  1. Create XML files that represent cross reference data.

    listOfAppType.xml

    listOfAppInstance.xml

    listOfValueXRef.xml

    listOfValueXRefData.xml

    SetupFile.xml

  2. Now you have all the data that you need for your Value cross Reference. Now deploy these data to the BizTalk Management Database.

    Give the following Command in your command prompt.

    btsxrefimport –file=SetupFile.xml

  3. Using the cross reference in your map.

    From the Tool box drop the Get Common Value Functoid and connect the type field from your source schema to it.

    Double Click the Get Common ID Functoid and add 2 more inputs as shown below

    Re arrange the input parameters order as follows. Otherwise you will get GetCommonValue() functiod failed as the method takes the parameters as follows:

    GetCommonValue(string valueXRef, string appType, string appValue);Ex:

    Ex:

    CrossReferencing.GetCommonValue("Type", "Application1", "TA")

    Now drop the Get Application Value Functoid and connect the output of Get Common Value Functoid to this one.

    Configure the Get Application Value Functoid Inputs as shown below.

    Re arrange the input parameters order as follows. Otherwise you will get GetAppValue() functiod failed as the method takes the parameters as follows:

    GetAppValue(string valueXRef, string appType, string commonValue)

    Ex:

    strCommonValue = CrossReferencing.GetCommonValue("Type", "Application1", "TA");

    strCompany2AppValue = CrossReferencing.GetAppValue("Type", "Application2", strCommonValue);

    The Output of this Functoid will be the equivalent Application2 value for the Application1 Input.

    Similarly Map for the Application1 and Application3.

Output:

Input message:

Output message:

Thursday, 5 December 2013

Windows Azure Biztalk Services: Windows Biztalk Adapter Service Setup wizard ended prematurely

While installing windows biztalk adapter service, you may get the following error.
Microsoft BizTalk Adapter Service Setup Wizard ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, run Setup Wizard again. 
This is due to insufficient privileges to the access "C:\Windows\System32\inetsrv\config". This may be due to User access control(UAC) in your machine or User doesn't have full permissions to that folder. To resolve this issue
  1. Stop UAC and grant permission to that user to config folder
  2. Open the command prompt in run as administrator mode and run the Msiexec command as follows.
msiexec /i BizTalkAdapterService.msi /l*vx install_log.txt

Windows Azure Biztalk Services: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

While deploying Biztalk Services to Windows Azure, you may get the following exception.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
To resolve this issue download the SSL Certificate from the Azure portal and import to local machine Trusted Certificates.

Steps to download and import certificate to local machine:

  1. Go to biztalk service from management portal
  2. Click on Dashboard
  3. Download SSL Certificate
  4. In run type certmgr.msc 
  5. Go to Trusted root certification authorities -> Certificates
  6. Right click on Certificates=>All tasks => Import
  7. Select downloaded certificate file and click on next=>next to import the certificate
  8. You will get an alter message that Imported successfully.

Tuesday, 3 December 2013

Windows Azure Biztalk SErvices: Unable to load the binding: 'sqlBinding'

This is an issue with the installation of  Microsoft Biztalk Apater Pack. Some times it will not set the apater configuaration in the Machine.config. We can set the configuaration mannually to resolve this issue.

Please find the article at http://msdn.microsoft.com/en-us/library/dd787990.aspx#BKMK_SQLSetupBinding to troubleshoot this issue. 

Windows Azure Biztalk Adapter Service: There was no endpoint listening at 'XXX' that could accept the message. This is often caused by an incorrect address or SOAP action

When I am working with Windows Azure Biztalk Services. I was encountered one issue as follows:
There was no endpoint listening at https://xxx.servicebus.windows.net/biztalkadapterdemo/event/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
 After lots of searching online and looking at logs etc it turned out to be a simple solution to just restart the WAS service (Windows Process Activation Service)

Windows Azure Biztalk Adapter Service: ConnectionException: Login Failed for user 'XXX'

When you are working with the Windows Azure Biztalk Adapter Services and SQL LOB Type. You may get the following exception.
 ConnectionException: Login Failed for user 'XXX' 
The reason is the provided user is unable to authenticate SQL Database. Verify your login details for having permissions to that data base or not.

For Windows Azure Biztalk Services, you can authenticate through the following 4 different options:

FIXED USER: This is the SQL authentication that we provided in the machine.
FIXED WINDOWS CREDENTIALS: You can provide a Domain, Username and Password to connect to the SQL Database.
CUSTOM SOAP HEADER: The client as a part of message is going to sent a UserName and Password to connect to Sql Database. This will come as part of the SOAP header.
MESSAGE CREDENTIAL: Client will send username and Password in WS-Security header of the message.

Tuesday, 12 November 2013

Biztalk Cross Reference

Reference Data:

Reference data means, it is an object within a system that is restricted to specific list of values. In integration scenarios when you are passing a message from one system to another these lists of reference data are different between the systems. (Where a particular field of the source maps to another field in destination. But their values aren’t so agreeable)
If we use an EAI (Enterprise Application Integration) pattern, you can have one input and more than one output flow. So, in this case, you must translate the property Value or Id in a Reference Value or Id.
In this case consider the example diagram:

Example Scenario:

We have a field called status in Application1 which field named mapped to status in Application2 and status in Application3. But the possible list of values are different.
Field
Application 1
Application 2
Application 3
Status
Open
Entered
Started
Status
Closed
Done
Finished

How to solve this issue?

There are many possible ways.
Write an inline script / xslt in a Scripting Functoid

  1.        Use an External dll that takes an input and returns an equivalent output
  2.        Use of BizTalk Server Cross Reference Functoids.
  3.        Custom Functoids and Lots of more options….
Explained here for pros and cons of each solution.
This article provide solution by using Cross Reference Functiods. The cross referencing database functoids use data from tables stored in the BizTalkMgmtDb SQL Server database. The functoids available and XML files that represents the reference data listed below.

Functiods available in Biz talk:

 Get Application ID
Retrieves an identifier for an application object.
 Get Application Value
Retrieves an application value.
 Get Common ID
Retrieves an identifier for a common object.
 Get Common Value
Retrieves a common value.
All these functiods are listed under Database functiods group.

XML files that represents the cross reference data:

SetUp-Files
This will have the path to all other files
listOfAppType
This will have the list of applications. In our case it is “Application1″ ,“Application2″ and “Application3”
listOfAppInstance
For each Application created, an instance should be created
listOfIDXRef
This XML file will hold the IDs for which we create Data. In our case it is the “Status”
listOfIDXRefData
This file will hold the data for Common ID, “Application1″ data “Application2″ Data, and “Application3” data
listOfValueXRef
This XML file will hold the IDs for which we create Data. In our case it is the “type”
listOfValueXRefData
This file will hold the data for Common value, “Application1″ data “Application2″ Data, and “Application3” data
listOfMessageDef
This XML file hold the information related to message codes
listOfMessageText
This XML file hold the information related to message binding to the message code
You can find in MSDN for more information about document structure and how to import data for Cross referencing functoids.
Note: we can have any name for file but the format of data should be as per documentation.

Solution Approach:


  1.        Create a XML files that represents the cross reference data.
  2.        These XML files (data) are imported to a set of Tables inside BizTalk Management Database (BizTalkMgmtDb) using BizTalk Server Cross Reference Import tool (btsxrefimport.exe)

Cross Reference Types:

There are 2 types of Cross Reference –