Tuesday 15 September 2015

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "WcfReceivePort_OracleDBBinding_XXXXXXX" URI: "oracledb://XX.XXX.XX.XX:XXXX/XXXXX/Dedicated" Reason: Cannot locate document specification because multiple schemas matched the message type "http://Microsoft.LobServices.OracleDB/2007/03/POLLINGSTMT#POLLINGSTMT".

ERROR:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "WcfReceivePort_OracleDBBinding_XXXXXXX" URI: "oracledb://XX.XXX.XX.XX:XXXX/XXXXX/Dedicated" Reason: Cannot locate document specification because multiple schemas matched the message type "http://Microsoft.LobServices.OracleDB/2007/03/POLLINGSTMT#POLLINGSTMT".


SOLUTION:

Go to your receive location and double click on browse button of XML pipeline you will get a pop up window like below :


















As you can see the first option "Allow UnrecognizedMessage" is set to "FALSE', Make it true:
I hope your error will be gone:

After making it true if you are again getting the same error then:

There is another application that uses a schema generated using the POLLINGSTMT operation
To avoid this, when you specify your connection settings to generate your metadata in VS, you should specify a unique POLLING ID (on the connection details tab), and then use the same POLLING ID when configuring your receive port too.

Thank you

Monday 14 September 2015

Custom Pipeline to remove Unknown/Unwanted/ Characters from Incoming XML message in Biztalk.

Hi Friends,

I got a requirement where I was receiving a incoming xml message from client, that I had to process in Biztalk.

But when we received that message what we found that there was some unknown characters was added as header in that xml file. because of that files were failing at pipeline level. 

Due to some limitations client was not able to remove that header. So I had one option to use custom pipeline to remove that extra unwanted characters and make a valid xml message.

This is my scenario but you can take this example as reference for your requirement if you have:

First I will Show you the incoming message what I was getting from client:























This is my input message. in this message the part I have highlighted from Yellow color is the Unwanted characters which has been added as Header.

The part which is not highlighted, is the actual message what I suppose to receive.

The actual message will be like below snapshot:












Solution:

I will paste the complete code down, but before I would like to give a brief details what I am doing in that code.

Please note its my solution for my requirement specific to me:

I am searching for the position of string <?xml in the incoming message and wherever I am getting that string I am removing from index 0 till that position of <?xml. This I am using at Decode level in custom pipeline.

Here is my code below:






Steps To use this pipeline:

1.Sign in the DLL.
2.Register the DLL in GAC
3.Copy the DLL to Biztalk pipeline component folder.


Thank you for reading this.

Anshu Kumar






Tuesday 14 July 2015

Executed as user: NT SERVICE\SQLSERVERAGENT. Server '' is not configured for RPC. [SQLSTATE 42000] (Error 7411). The step failed.

Dear all, 

While running SQLSERVERAGENT we get this error. 

For my case I used below query and my problem was solved.

Please run below query:

EXEC master.dbo.sp_serveroption @server=N'<Server Name>', @optname=N'rpc', @optvalue=N'true' 
exec sp_serveroption @server='<Server Name>', @optname='rpc out', @optvalue='true'


Thank you.

Thursday 9 July 2015

Prerequisite Skills and Knowledge for developer of BizTalk solutions

Prerequisites for Developers

A developer of BizTalk solutions must be at least moderately experienced with the use of
  • Microsoft Visual Studio 2013 and the development of .NET solutions
  • Programming with the .NET Framework
  • Extensible Markup Language (XML)
  • Extensible Stylesheet Language Transformations (XSLT)
  • XML Schema Definition Language (XSD)
  • Web Service use and development

Prerequisites for IT Professionals

The following table shows the areas of proficiency expected for a system administrator or IT professional.



An IT Pro responsible for the deployment of BizTalk solutions must be at least moderately experienced with the use of the following:
  • Microsoft Windows Installer (MSI)
  • Windows Server 2008 SP2 or Windows Server 2008 R2
  • SQL Server
  • Windows SharePoint Services
  • Performance monitoring and optimization techniques
  • Back and restore concepts and techniques
  • Internet Information Services (IIS) if exposing orchestration as Web or WCF services.

Source Taken From: https://msdn.microsoft.com/en-us/library/aa577674.aspx

Sunday 28 June 2015

Split XML repeating child Node along with its common fields and create separate message in Biztalk Orchestration.

Hi all,

I got a requirement where I have to split a incoming xml message into individual message based on number of child nodes. Ok no need to confuse I will tell Step by Step with snapshot:

This is my Input message:


As you can see that we have child node  <TESTSTATUS_DETAIL> which has been repeating two times in this message. This can repeat n number of times.

What I want to do here that I want To Extract every child node one by one in orchestration wanted to create single separate message for each child node. For example in this message child node has been repeated two times so we will create two individual message along with its common fields.

The ouput I want like below snapshot:



this is first single message in which first child node has been selected. second message will also be of same structure but the second child node will be selected and so on third , fourth if any.

To achieve this target in orchestration I have done some steps; First I will show u complete orchestration and then step by step process:

This is my complete orchestration snapshot:








Now shape By shape details:

Shape 1 (Msg Receive Shape:)

In this I am receiving my Input message which I have shown u in above pic.


Shape 2(JobCount Expression Shape)

XmlCompleteContent = msg_Test ;

ElementCount=1;


CountVar=(System.Int32)xpath(msg_Test, "count(/*[local-name()='TEST_EVENTS' and namespace-uri()='http://TEST.BizTalk.Schemas.XML_Target_JobEvents']/*[local-name()='TESTSTATUS_DETAIL' and namespace-uri()=''])");


I have written this code in this shape. Here I have taken XmlCompleteContent as variable of type xml. Since I need to loop it through so I am initialising ElementCount=1; and using Xpath I am couting the no of child nodes in CountVar which is type of int variable.

Shape 3(Loop Shape)

In this shape I have written ElementCount<=CountVar as we do in any loop 

Shape 4(Construct Message Shape)

msg_Test=XmlCompleteContent;

XpathStatement= System.String.Format("//*[local-name()='TEST_EVENTS' and namespace-uri()='http://TEST.BizTalk.Schemas.XML_Target_JobEvents']/*[local-name()='TESTSTATUS_DETAIL' and namespace-uri()='']["+ ElementCount.ToString() +"]");
xmlContent = xpath(msg_Test, XpathStatement);


In this shape we are constructing the Msg_Test message is of type Xml Target Schema.

Below is the snapshot of Xml_Target Schema.


Within Construct message shape in second message assignment Shape we are creating our support schema which will extract the child node and assign to message Msg_orchestration Support. This message is of type Support Schema.  Below is the snapshot of Support Schema.




we have writteb the below code in 2nd message assignment shape:

varXML = new System.Xml.XmlDocument();

varXML.LoadXml(@"<TESTSTATUS_DETAIL>
  <EMPID>EMPID_0</EMPID>
  <CMP>CMP_0</CMP>
  <CCD>CCD_0</CCD>
  <KDTLCTN>KDTLCTN_0</KDTLCTN>
  <KDTUTC>KDTUTC_0</KDTUTC>
  <DNM>DNM_0</DNM>
  <KOFF>KOFF_0</KOFF>
  <LCD>LCD_0</LCD>
  <LOFF>LOFF_0</LOFF>
  <TLCTN>TLCTN_0</TLCTN>
  <TUTC>TUTC_0</TUTC>
</TESTSTATUS_DETAIL>");


msgOrchestrationSupport = varXML;

msgOrchestrationSupport=xmlContent;

Shape 5(Construct Message Shape)

In this shape we are constructing the message_test01 message which is also type of Xml Target Schema.

For achieving this we are using transformation.
Below is the Snapshot of transformation:




Shape 5(Expression_increment Shape)

In this shape I have written below Code:



ElementCount= ElementCount + 1;


                                                            Thank you for reading this post. If any errror is there please give me feedback so that I can improve. Happy Coding



Monday 4 May 2015

Remove Header from CSV File in Biztalk

Hello Friends,

Please see below sample data which you receive in a flat file.

FName,MName,LName
John,K,Cena
Rambo,D,Parera

As you can see that first row is heading Like Fname,MName and LName. so when you do mapping then heading will be also mapped as data in target schema.

What my requirement is that I dont want to Include Heading in my output. I want only the exact data from the CSV file which I am receiving. for example only 2nd and third row.

I want Output as Below:




To achieve this target I have created one flat file schema and one target schema and mapped it. The step by step details I am attaching below:

Step 1: Add New Item and select Flat File Schema Wizard, give any name.



Step 2: In Flat File Schema Information Window Change the record Name and select the input Instance.
Step 3: In Select Doccument Data window Select the heading and and and first row after heading.


Step 4: Select Record Format By Delimiter Symbol.

Step 5: In Delimiter Record Select child Delimiter as CR LF.
Step 6: In Child Elements Window change the name as "Header" and the element Type of Header to "Record" and change the element type of exact date to "Repeating Record".

Step 7: In Schema View Select the Header and Click Next.

Step 8: In Select Document Data Window select the Header and click next.

Step 9:In Delimited Record select Child Delimiter as comma(,)
Step 10:In child Elements Window leave as it is or you can change the name and click next.

Step 11: Now select the Emp Node and click Next.
Step 12: In select doccument data window select the second row and click next.
Step 13: select , in Child Delimiter.
Step 14: In child Element window you can change the element name as required.
Click Finish to complete the wizard.

The source schema will look like as below:

Now Create a Target Schema same as below:
Now we will add a map to our project and will choose the source schema and target schema.

The mapping will be like below:

As you can see in above map we are not mapping the Header to Target schema so the heading will not come in target output.

we will get our required output without first row i.e Heading.

Our Output Will be Like below:



I hope I am clear in this demo. This is Sample one you can take it as a reference and complete your requirement.


Event ID List of Common Warnings and Errors In Biztalk

Hello Friends,

Here in this list you can find some common Error details which is associated with same Event ID. 
For Example when you see EVENT ID 5740 you can see that this event id is same but Error Details are different.

Event ID
Error Details
Type
5740
The adapter "FTP" raised an error message. Details "Unable to connect to FTP server "X.X.X.X" as user "TESTUSER” Inner Exception details: "No FTP server found on the specified address. ". ".
Warning
5740
The adapter "FTP" raised an error message. Details "The folder "Test Folder" does not exist. ".
Warning
5740
The adapter "FTP" raised an error message. Details "The adapter recovered from recent failures. The Event Log Error Threshold count reset. ".
Warning
5740
The adapter "FTP" raised an error message. Details "Unable to receive the file "Test File Name" from the FTP server.  The error that occurred was "A stream read or write operation failed because the stream is in an error state.
Warning
5740
The adapter "FTP" raised an error message. Details "A failure occurred when parsing the remote folder listing. Inner Exception details: "An error occured while receiving a reply line from the FTP server. ". ".
Warning
5649
The receive location "RcvLocation" with URL "Test URL" is shutting down. Details:"The error threshold was exceeded. ".
Error
5410
An error occurred that requires the BizTalk service to terminate. The most common causes are the following:
 1) An unexpected out of memory error.
 OR
 2) An inability to connect or a loss of connectivity to one of the BizTalk databases.
 The service will shutdown and auto-restart in 1 minute. If the problematic database remains unavailable, this cycle will repeat.
Warning
5719
Unable to receive the file "Test File Name" from the FTP server.  The error that occurred was "The data transfer has been aborted by the FTP server. ".
Error
5719
Unable to receive the file "Test File Name" from the FTP server.  The error that occurred was "A stream read or write operation failed because the stream is in an error state. ".
Error
5743
The adapter failed to transmit message going to send port "Test Send Port" with URL "Test URL". It will be retransmitted after the retry interval specified for this Send Port. Details:"The folder "Test Folder" does not exist. ".
Warning
5753
There was a failure executing the receive pipeline: Reason: Unable to receive the file "Test File Name" from the FTP server.  The error that occurred was "The data transfer has been aborted by the FTP server. ".
Error
5753
There was a failure executing the receive pipeline: Reason: Unable to receive the file "Test File Name" from the FTP server.  The error that occurred was " The remote file could not be opened by the FTP server. ".
Error
5754
The remote server refused a data connection.Please check permissions on the remote system.
Error
5754
The folder "Test Folder" does not exist.
Error
5754
"A message sent to adapter "Test Addpter" on send port ORA-06508: PL/SQL: could not find program unit being called: ""PUBLIC.OWA_UTIL""
Error
5792
The Messaging Engine encountered an unexpected error while trying to suspend messages received by adapter "FTP" that failed due to routing failure. Details: "An error occurred when accessing the part data or one of its fragments. The part data or fragment may not exist in the database. ".
Error







6998
"Unable to communicate with MessageBox BizTalkMsgBoxDb on SQL Instance <test Name>. Error Code: 0xc0c01b45. Possible reasons include:
 1) The MessageBox is unavailable.
 2) The network link from this machine to the MessageBox is down.
 3) The DTC Configuration on either this local machine or the machine hosting this MessageBox is incorrect."
Error
10034
ORA-06508: PL/SQL: could not find program unit being called: "SYS.OWA_CX",ORA-06508: PL/SQL: could not find program unit being called: "PUBLIC.OWA_UTIL"
Error

Wednesday 18 March 2015

Get Body of the suspended message in Biztalk programmatically using C#

Hi Friends,

Sometimes there may be situation when there are many suspended messages in Biztalk and sometimes we need to extarct the body of those suspended message programmatically.

I had also this situation so I wrote one code that helped me. I am sharing this code may be U can get some reference from this code and customize it as per your requirement.

In My Condition I am just getting the message instanceId and message body of suspended message and displaying in gridview.

I have taken one Web Application and after adding the webform in my web application I took a gridview as below:




























In code behind file you need to use below code---

Please dont forget to add below to dll file....

using Microsoft.BizTalk.Message.Interop
using Microsoft.BizTalk.Operations

























As you can see there is BindGrid() method I have created. you can see the code and you can use this method in your program to get the body of any supended message in biztalk.

Thank you for reading this.


Tuesday 10 March 2015

FTP Adapter Common Error BizTalk server

You receive a "Failure occurred in parsing the remote folder listing" error message when you try to retrieve documents from or send documents to an FTP server

Problem
When you try to retrieve documents from or send documents to an FTP server by using the Microsoft BizTalk Server  FTP adapter, you receive an error message that is similar to the following:
A failure occurred in parsing the remote folder listing.
Cause
You may receive this error message if the following conditions are true:
  • The receive handler or the send handler for the BizTalk Server FTP adapter is configured to use a firewall mode of Passive.
  • The target FTP server does not permit passive connections.
Resolution
To resolve this behavior, use one of the following methods:
  • Configure the receive handler or the send handler, or both, for the BizTalk Server  FTP adapter to use a firewall mode of Active.
  • Configure the target FTP server to permit passive connections.
The FTP adapter can be used to connect to FTP servers on systems ranging from Solaris and Linux to AS/400. For more information about connecting to legacy systems, see Configuring an FTP Adapter to Work with Legacy Hosts.

FTP receive adapter fails to publish message if receive pipeline processing time exceeds server time-out

Problem
A message received via the FTP adapter is not published to the MessageBox database. 
Cause
The time taken to complete pipeline processing exceeds the FTP connection time-out.
Resolution
Use one of the following methods to mitigate this problem:
  • Increase the connection time-out value. Set the idle time-out value on the FTP server to be at least the amount of the time it takes to process the file.
  • Use the Temporary Folder feature on the receive location. In this case, the FTP adapter copies the file to the temporary folder (typically the local disk). It typically takes less time to copy the file to the local disk than to run the message through the pipeline and persist it to the MessageBox database, which effectively reduces the idle time. 

Thursday 19 February 2015

BizTalkBeginners: Splitting Delimited Values of single node in BizTa...

BizTalkBeginners: Splitting Delimited Values of single node in BizTa...: Hello Friends, Today I got a situation where I have a address node in which complete address was stored with comma(,) separated like &qu...

Splitting Delimited Values of single node in BizTalk Maps and map to multiple nodes


Hello Friends,

Today I got a situation where I have a address node in which complete address was stored with comma(,) separated like "Madhapur, Hyderabad, India".
What I wanted to do is that extract every single separted with comma and map to different different node to target schema.

For Example, "Madhapur" to "City" node
                       "Hyderabad" to "State" node
                       "India "          to "country" node in Target Schema.

For yor better I am attaching sample screenshots here.

1. This is the input file for map
As you can see in this xml file that we have node called Address under which we have value stored 

"Madhapur, Hyderabad, India" with comma separated.

2.  Screenshot of Map

As you can see that in target schema "TargetAddress" we have three nodes City, State and Country in which I am assigning three different values which is stored under Address in source schema with comma separated by using scripting functiod.

Now what you have to do is.Just take 3 different scripting functoids and place it on the map.

------Code for First Scripting Functoid..i.e for City Node.------

public string City(string str)
{

           string[] words = str.Split(',');
            string result= words.GetValue(0).ToString();
            return result;
}

------Code for First Scripting Functoid..i.e for State Node.------


public string State(string str)
{

           string[] words = str.Split(',');
            string result= words.GetValue(1).ToString();
            return result;
}


------Code for First Scripting Functoid..i.e for Country Node.------


public string Country(string str)
{

           string[] words = str.Split(',');
            string result= words.GetValue(2).ToString();
            return result;
}



when you use these three scripting functoids we will get our desired results as below:


As you can see that these values has been mapped to respective nodes.


Thank you for reading this.

Anshu Kumar