Step by step configuration One Way XmlPolling WCF-SQL adapter in BizTalk Receive Locations Skip to main content

Step by step configuration One Way XmlPolling WCF-SQL adapter in BizTalk Receive Locations


In my this post I am going to share my personal experience to configuration WCF-SQL Receive location using XmlPolling, Please go through with following steps:

1. Open BizTalk Server Administrator Console and Expand your BizTalk application

2. Right Click on Receive Location>New>One-Way Receive Location and Choose your receive port then click OK button.

3. Type proper name of receive location then choose transport type as WCF-SQL (If there is no WCF-SQL type, please install it form BizTalk setup and add adapter from Platform settings) and select Receive handler for it and leave receive pipeline as XML Receive.

4. Click on Configure... button from right side of transport type

5. In General tab type EndPoint Address - connection setting of SQL server (It should be unique)

6. Now Click Binding Tab then expand (FOR XML) and in XMLStoredProcedureRootNodeName: type xml root name of your schema where you want to retrieve table value in your schema tags after that in XmlStoredProcedureRootNodeNamespace: type Target Namespace form the same schema(.xsd file).

7. Continue same in Binding Tab for General Property of Timeout value pleaser read my post - Configuring BizTalk WCF Timeout Values on a Binding

8. Continue same in Binding Tab in Inbound property select XmlPolling and from Polling(Inbound) property value of PollingDataAvailableStatement: Select 1 or Select GetDate() or any procedure or select any view or select with any table with condition when you want to execute Polling statement (PollingStatement) procedure in given polling interval with property from  PollingIntervalInseconds

9. Go to Other tab set your SQL Server credential User name and Password

10. Now in Messaging tab leave default setting except Error handling section:
 i. Uncheck Disable location on failure because if any error occur then Receive Location would be disable
 ii. Check Suspend request message on failure so that if in case of error message is suspend and  resumable  in BizTalk administrator console
iii. check Include exception detail in faults so if you are using two-way receive location in wcf web service then exception marked in fault.

11. Finally click two times OK and all BizTalk WCF-SQL XMLPolling receive location configuration is done.

12. Now very important to map SQL procedure and xml schema i.e called in WCF-SQL receive location with the help of below following SQL Proc:

USE [BizTalkLive]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:           <Jitendra Yadav from BizTalkLive>
-- Create date: <02-Jul-2017>
-- Description:      <Get Account Request data from requested accounts>
-- =============================================
Create PROCEDURE [dbo].[procGetAccountRequestData]
AS
BEGIN

       SET NOCOUNT ON;

    WITH XMLNAMESPACES (DEFAULT 'http://BizTalkLive_WCF_SQL.AccountRequest')
       SELECT AccountNumber, IFSCCode
       FROM tblAccountMaster AccountsRequest WITH(NOLOCK)
       FOR XML AUTO --, XMLDATA
          
END

In above procedure there are two main point i.e.

 i) WITH XMLNAMESPACES (DEFAULT 'http://BizTalkLive_WCF_SQL.AccountRequest')
If you are not define your default target namespace of your schema then when you enable your WCF-SQL Receive location, It does not map with your schema as call in receive location and you get error in your BizTalk console. In SQL Query "WITH" expression is mandatory to break ";"(Semicolon) otherwise when you complied your procedure then definitely receive following error:

"Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon."

ii) Table name and attribute should be same as in xml Root/Record and Attributes/Elements respectively as return in SQL query. Pl see below xml schema of above procedure-


Thats it all configuration has completed.

!! Keep visiting BizTalkLive !!

Comments

  1. This is an amazing blog, and it helps students.Thanks for haring
    Biztalk
    Online training Bangalore

    ReplyDelete
  2. This Content is simply amazing, and helpful for students and business people. Gathered lots of information and waiting to see more updates.
    Features Of RPA
    How RPA Works

    ReplyDelete
  3. Thanks for this useful blog, keep sharing your thoughts...
    Unix Program
    Unix Applications

    ReplyDelete

  4. Nice informative content. Thanks for sharing the valuable information.

    RPA Training in Chennai
    RPA Training Online
    RPA Training In Bangalore

    ReplyDelete
  5. Thank you for this blog. It is very useful. Share more like this.

    JAVA Training in Chennai
    JAVA Course in Chennai

    ReplyDelete
  6. An RDP Server is a specialized software application that enables remote desktop access. It allows users to connect to a host computer from a remote location and interact with the desktop interface as if they were physically present at the machine.

    ReplyDelete

Post a Comment

Please write comment only that belongs to this blog

Popular posts from this blog

BizTalk Interview Question and Answer

1. What is BizTalk? BizTalk is a middleware that sits in the middle of any two software who wish to communicate with each other and agree on some specified communication pattern. It uses SQL Server as back end database. “Microsoft BizTalk Server is an Inter-Organizational Middleware System (IOMS) that enables companies to automate business processes, through the use of adapters which are tailored to communicate with different software systems used in an enterprise. Created by Microsoft, it provides enterprise application integration, business process automation, business-to-business communication, message broker and business activity monitoring.”                 2. What is BizTalk Server Architecture and Life Cycle of Message? BizTalk Server Architecture: Life Cycle of Message: In this simplified view, a message is received through a receive location defined...

Configuring BizTalk WCF Timeout Values on a Binding

There are a number of timeout settings available in WCF bindings. Setting these timeout settings correctly can improve not only your service’s performance but also play a role in the usability and security of your service. The following timeouts are available on WCF bindings: OpenTimeout CloseTimeout SendTimeout ReceiveTimeout Open Timeout :  This property represents the amount of time a channel open operation has to complete. Send Timeout :  Use this property to set the amount of time that a send operation has to complete. When used as part of a solicit-response scenario, this value encompasses the total amount of time for the interaction to complete. If we are sending a large message, we may need to increase this timeout to allow for the request and response messages to be processed within this window. Close Timeout :  A time-stamp that is used to indicate the amount Receive Timeout :  Used by the Service Framework Layer to initialize the...

PowerShell Script to enable BizTalk Receive Location

We are facing problem in BizTalk server 2016 that few of running SFTP Receive location would be stopped after some time due to sftp connectivity issue of their threshold so I am going to share PowerShell script to enable receive location by window task scheduler. Before execute following script Please do following task a. Set Server name in ConnectionString b. Set ( $hostname) host name value that is using in SFTP Receive location c. Set ( $rcvLocation) Receive location name # Import external assembly and create a new object [ void ] [ System.reflection.Assembly ]:: LoadWithPartialName( "Microsoft.BizTalk.ExplorerOM" ) $Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer   #BizTalk Config $Catalog . ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"   #connectionstring for the BizTalkMgmtDb $hostname = "BizTalkServerApplication" #hostname $rcvLocation = "RL_GetAccReq_SQL...

Publish a web service in biztalk using BizTalk WCF Service Publishing Wizard

Welcome you again in my Blog and let us do another mind blowing achievement that how to publish a WCF web service in BizTalk and as in previous post to Complete BizTalk project to host Schema as Web Service  so If you want to expose/publish a web service, you should run through the BizTalk WCF Service Publishing Wizard. This wizard guides you through choosing what you want to expose as a web service. This section walks you through the wizard step by step to publish WCF Web Service using  WCF-WSHttp- Step-1:  To start the wizard, go to Start, All Programs, Microsoft BizTalk Server 2016(version), BizTalk WCF Service Publishing Wizard. This fires up a welcoming screen, on which you just click Next. Consider disabling the welcoming screen for the future by checking the check box at the bottom. You will now see the screen shown in above figure. Step-2: Choose the Service Endpoint option, and choose which adapter to use. Check Enable Metadata Endpoint if you wa...

Step by step solution of BizTalk Two-Way WCF-SQL XmlPolling in Send Port

I am going to share most awaited Two way WCF_SQL Two Way XmlPolling so that you can easily enhance your old SQL procedure and BizTalk Map without any big change. I know there is no content available in any website to how work with XmlPolling in WCF-SQL two-way adapter. In the last of this post you can download complete source code with an example. Please follow carefully all steps – 1. Open Microsoft Visual Studio as Administrator user and Click File>New>Project… In Installed Templates click BizTalk Projects then Empty BizTalk Server Project and Name as “BizTalkLive-WCF-SQL” and click OK. 2. Now see the below picture and create all respective folders separately for Schema, Map, Orchestration, Pipeline, Binding- 3. Create Schemas in Schema folder as shown below picture to get Account request using One Way WCF-SQL XmlPolling a) Create Envelope Schema first with Target NameSpace - http://BizTalkLive_WCF_SQL.AccountRequest b) Create Second Sch...