Ravindar, Biztalk Developer and Administrator

Just another BizTalk blog

numbers conversion to custom decimal digits in BizTalk

In the MSDN BizTalk forums, one guy has questioned about converting a number/decimal to have predefined decimal points.

means for example if the value is 10.23, he wanted to display it as 10.2300.

one of the MSDN contributer boatseller has given excellent solution.

I’ve learnt this from the post here. the conversion code goes like below

private string formatTo4Dec(string number)
{
   double dblNumber;
   if (double.TryParse(number, out dblNumber))
   {
      return dblNumber.ToString("F4");
   }
   else
   {
     throw new System.ArgumentException(number + " is not a valid number format.");
   }
}

similarly for date time custom formats you can have a look here

Advertisements

June 18, 2014 Posted by | Biztalk Server | Leave a comment

BizTalk articles published in Microsoft Technet Monthly Magazine

i feel pretty much happy that two of my BizTalk articles

this and this have been published into monthly magazine by Microsoft Technet.

you can access those two full magazines here and here

June 18, 2014 Posted by | Biztalk Server | Leave a comment

HTTP adapter issues and troubleshoot

I was working to configure HTTP adapter in BizTalk 2010 and faced few issues.

After all struggle i found that the problem was with the .net client code i was using to test, its not problem with BizTalk in any way.

Note: i have learnt that if we try to configure HTTP adapter for 64bit, we need to make sure the apppool should run on .net 4.0 version.

Anyway during the course of this troubleshoot following links have really helped me

http://www.biztalkbill.com/Home/tabid/40/EntryId/66/Configuring-BTSHTTPReceive-dll-to-work-on-IIS-7.aspx

http://chibionos.wordpress.com/2009/08/30/problem-1-internal-server-error-500/

http://msdn.microsoft.com/en-us/library/aa559072(v=BTS.70).aspx

http://thebiztalker.wordpress.com/2011/01/13/configure-https-adapter-with-biztalk-server-2010/

http://tutorial.programming4.us/windows_server/biztalk-2010-recipes—adapters—configuring-http-receives.aspx

http://snefs.blogspot.in/2009/11/using-biztalk-httpreceiver.html

http://msdn.microsoft.com/en-us/library/aa559072.aspx

http://soa-thoughts.blogspot.in/2011/07/using-btshttpreceive-in-x64-environment.html

http://rohitt-sharma.blogspot.in/2011/03/biztalk-tutorial-part-7-using-two-way.html   (don’t use the .net client code given in this link, it did not work for me)

 

 

June 18, 2014 Posted by | Biztalk Server | Leave a comment

Common pipeline that can be used for validation in any BizTalk application

Nabeer has written an excellent article here about a common pipeline that can be used for validation for any schema in biztalk.

Means you can use this pipeline in any BizTalk application for validation purpose, it will validate any schema that is deployed in to biztlk.

I have tested it with multiple scenarios and it works like a charm. If your need is only to use a common pipeline that can validate, then this is a good to use

June 18, 2014 Posted by | Biztalk Server | Leave a comment

View BizTalk artifacts with WMI

Today my colleague Satendra told me a wonderful feature of WMI ability to view BizTalk artifacts information.
Thankful to him for sharing it with me.

Go to command prompt and type “wbemtest”
this will open a window like below

View BizTalk artifacts with WMI

click on connect, this will open another window. Enter namespace root/MicrosoftBiztalkServer as shown below and click connect

BizTalk_with_WMI _2

once connected, it will open a window like below. Now click on “Enum Classes”

BizTalk_with_WMI _3

This will open a dialog box like below, don’t enter any thing in the text box. Just select “Recursive” option like below and click OK

BizTalk_with_WMI _4

this will open a window like below. Scroll down until you see biztalk resources and double click on any one. i choose send ports like below.

BizTalk_with_WMI _5

this will open a window like below

BizTalk_with_WMI _6

Now click on “instances”, this will open a window listing all available send ports (it takes few seconds to list them)
BizTalk_with_WMI _7

Now double click on required send port . This will open a window like below

BizTalk_with_WMI _8

Now click on “Show MOF”, this will open a window
like below.
BizTalk_with_WMI _9

This is where all the port information is displayed. Scroll down through the window to see all properties.
Similarly follow the same steps for other artifacts as well.

September 3, 2013 Posted by | Biztalk Server | Leave a comment

How to View assemblies in GAC folder and take back up of them

run following command

c:\windows\assembly\gac_msil

or based on requirement

C:\Windows\Microsoft.NET\assembly\GAC_MSIL

June 14, 2012 Posted by | Asp.Net, Biztalk Server, Uncategorized | Leave a comment

Microsoft.BizTalk.ExplorerOM.dll is different from version to version

Microsoft.BizTalk.ExplorerOM.dll of a specific BizTalk version can only access the specific version of the databases of that BizTalk version.
So you cannot use ExplorerOM.dll from BTS 2006 to access a BTS 2009 database.

http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/56f4ce47-52b5-4182-a277-94d673782c5c

 

May 21, 2012 Posted by | Biztalk Server, Powershell with Biztalk | Leave a comment

Using EXSLT in BizTalk

we need to create a xml that has EXSLT assembly like for example below

<?xml version="1.0" encoding="utf-8"?>
<ExtensionObjects>
    <ExtensionObject
     Namespace="http://exslt.org/dates-and-times"
     AssemblyName="Mvp.Xml,
     Version=2.3.0.0, Culture=neutral,
     PublicKeyToken=6ead800d778c9b9f"
     ClassName="Mvp.Xml.Exslt.ExsltDatesAndTimes"/>
</ExtensionObjects>

and now if you want to you EXSLT date funtion in your custom xslt, then mention like below

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:S1="http://ExtendedMapping.Schema1"
                xmlns:S2="http://ExtendedMapping.Schema2"
                xmlns:exslt="http://exslt.org/dates-and-times"
                version="1.0">
 
    <xsl:template match="/">
        <S2:Root>
            <Field>
                <xsl:value-of select="exslt:dateTime()"/>
            </Field>
        </S2:Root>
    </xsl:template>
</xsl:stylesheet>

And to loop through each distict node (faster grouping) in fast way,
you can use Distinct() function of EXSLT like below

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:set="http://exslt.org/sets">
  <xsl:output indent="yes"/>
  <xsl:key name="countryKey" match="orders" use="ID"/>
  <xsl:template match="root">
    <table border="1">
      <tr>
        <th>Order ID</th>
        <th>Ship City</th>
      </tr>
      <xsl:for-each select="set:distinct(orders/ID)/..">
        <tr>
          <th colspan="2">
            <xsl:value-of select="ID/text()"/>
          </th>
        </tr>
        <xsl:for-each select="key('countryKey',ID)">
          <tr>
            <td>
              <xsl:value-of select="@OrderID"/>
            </td>
            <td>
              <xsl:value-of select="@ShipCity"/>
            </td>
          </tr>
        </xsl:for-each>
      </xsl:for-each>
    </table>
  </xsl:template>
</xsl:stylesheet> 

and don’t forget to read below URLs
http://www.richardhallgren.com/how-the-extend-a-custom-xslt-in-biztalk-using-exslt-and-the-mvpxml-project/

http://msdn.microsoft.com/en-us/library/aa302297.aspx#xmlindexing_topic3

January 22, 2012 Posted by | Biztalk Server | Leave a comment

Validate incoming message in xml default pipeline

1) Open BizTalk Server Administration Console
2) Click on the application contain the receive location
3) Click on “Receive Locations”
4) Double click the particular receive location on the right hand side
5) Click the button next to the drop down list entitled “Receive pipeline”
6) Change “ValidateDocument” to true
7) set the DocumentSpecName
You can get the DocumentSpecName of a schema information by clicking on the schema node inside the
biztalk application by doing the Combination of Name + “,” + Assembly

July 14, 2011 Posted by | Biztalk Server | Leave a comment

Biztalk orchestration patterns

http://patternwizard.codeplex.com/

July 2, 2011 Posted by | Biztalk Server | Leave a comment