Wednesday, November 23, 2011

error BEC2004: Unrecognized data in remaining stream.


Charan: Hey Rohit I am getting a weird error while validating the instance of a simple flat file schema in visual studio.
Following the the simple flat file message here InfoHeader is tag identifier


and here is the schema created for this flat file


while validating the flat file using this schema I am getting the "error BEC2004: Unrecognized data in remaining stream." in Visual Studio output window as shown below:


Rohit: I got your problem you are getting this error because you have specified Header as Tag Identifier (tag_name in above screen shot) while it should be InfoHeader as per your flat file message so change it as shown below.


Charan: Ah it resolved the issue!!!

Cheers
Rohit Sharma

Friday, September 2, 2011

Microsoft releases the Cumulative Update Package 2 for BizTalk Server 2010 and BizTalk Adapter Pack 2010

You can download  these updates from these links:

"This cumulative update package for Microsoft BizTalk Server 2010 contains hotfixes for the BizTalk Server 2010 issues that were resolved after the release of BizTalk Server 2010"

 

Prerequisites

To apply this cumulative update package, you must have BizTalk Server 2010 installed.
Note The following components are updated if they are installed:
  • Microsoft UDDI Services 3.0 that is included on the BizTalk Server 2010 installation disk
  • Microsoft BizTalk Adapters for Enterprise Applications (also known as BizTalk LOB Adapters)
"This cumulative update for BizTalk Adapter Pack 2010 contains hotfixes for BizTalk Adapter Pack 2010 issues that were fixed after the release of BizTalk Adapter Pack 2010."

Prerequisites

To apply this cumulative update package, you must have BizTalk Adapter Pack 2010 or Microsoft Windows Communication Foundation (WCF) Line-of-Business (LOB) Adapter SDK 2010 installed.

Friday, August 12, 2011

Error: "The published message could not be routed because no subscribers were found."


Charan: Hey Rohit I am getting the error "The published message could not be routed because no subscribers were found." as shown below. Do you have any idea how I can get rid of it?


Rohit: As this error is stating that  "the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted." Let  trouble shoot this error by using the BizTalk Administration console. 

First check the properties in the context of message and verify if you can see the desired properties promoted.

Charan: hmmm ok I am opening the routing failure reports:

 
I can see the property 'Customer' is promoted in the context of message.

 
Rohit: Then the second step would be to check the subscription. Let me check the Activation Subscription:


I can't see any subscription. Have you forgot to enlist the Send Port/Orchestration.

Charan: Let me check 
ohh... yes I forget to start the send port.

Rohit: Then start it and resume the message again.

Charan: I have started it and resuming the message.


Charan: hmmm... I am still getting the same error

Rohit: Let me check the Activation Subscription details.


I can see that you have specified the wrong name in send port subscription. It is showing as "ab" and based on the value of property Customer in the context of the message I think it should be "abc". Correct it in send port filter and resume the message.


Charan: Ah!! at last it worked !!!

Cheers
Rohit Sharma

Tuesday, August 9, 2011

The Cumulative update package 3 for BizTalk Server 2009 is now available

The Cumulative update package 3 for BizTalk Server 2009 is now available. The cumulative update package for Microsoft BizTalk Server 2009 contains hot fixes for issues that were fixed after the release of BizTalk Server 2009. You can download it from here: http://support.microsoft.com/kb/2557149.

Tuesday, August 2, 2011

Debatching XML message


Charan: hmmm I am in little trouble. I have ax XML message confirming to schema shown below and I want to debatch it so that the size of message can be reduced by splitting it into little chunks but don't know how to do it.


Rohit: You can debatch this message by splitting message based on ResponseRecord. To do this you need to perform 3 steps.

1. Convert the schema to envelope.
2. Create schema for single ResponseRecord
3.Create a receive port using XMLReceive pipeline.

Step1: Convert the schema to envelope by following these steps:
1.1 Set Envelope property to Yes by selecting the <Schema>
 

1.2 Set Body XPath to ResponseRecords as shown below.



Step2: Create schema for single ResponseRecord which would be parse the  debatched records by XMLReceive pipeline.
2.1 Import the batch schema into this schema.



2.2 Set the Data Structure Type of Root Node to ResponseRecord from the imported schema


2.3 Rename the Root node to ResponseRecord and make sure that Target Namespace is Empty


Deploy this solution.

Step3: Create a receive location using the XMLReceive pipeline and send port to test the solution.

Cheers
Rohit Sharma

Friday, July 29, 2011

Visual Studio LightSwitch

Visual Studio LightSwitch seems to be a real productivity booster for some applications. See one demo here how even a business user can create the application.

Cheers
Rohit Sharma

Friday, July 22, 2011

Error: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem

Charan: Hey Pal I am getting this weird error not sure what is wrong everything was working fine few hours ago and now I am unable to start the 32-bit BizTalk host instances. I have even repaired the BizTalk installation and still getting the same error.


Rohit: Have you done any recent changes to the machine.

Charan: Yes I have installed one BizTalk application exported from the other machine and this application get its connection string from the configuration file of BizTalk so I have modified the 'BTSNTSvc.exe.config'.

Rohit:  Let me see the 'BTSNTSvc.exe.config' file.
I got the issue you have not closed the tag as shown below.


 Charan: Oh what a silly mistake it fixed the issue. Now I can start the orchestration instance.

Cheers
Rohit Sharma

Tuesday, July 19, 2011

How to remove leading zeros from the value of element in a map

Charan: I have one additional requirement to my old problem mentioned here. Now I want to remove the leading  Zeros for the value of Element1 in addition to finding the existence of this optional element in input schema. Is there any easy way to do it.

Rohit: hmmm yes we can do it using the scripting functoid and simple C# code. Let me show you how.

Step1: Add new scripting functoid.

 
Step2: Configure Functoid Script use Inline C# as Script Type: and use the following simple C# code to remove the leading zeros in string:

public string RemoveLeadingZeros(string param1)
{
      string result=param1;
      if(param1.StartsWith("0"))
      {
          result=param1.TrimStart(new char[]{'0'});        
      }  
      return result;
}


Step3: Modify the existing scripting functoid to use this code to remove the leading zeros:

<Element xmlns:p="http://CheckNodeExistenceInMap.InputSchema_XML">
    <xsl:choose>
        <xsl:when test="/p:Record/Element1">
            <xsl:value-of select="userCSharp:RemoveLeadingZeros(string(/p:Record/Element1))" />
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="/p:Record/Element2" />
        </xsl:otherwise>
    </xsl:choose>
</Element>


Cheers
Rohit Sharma

Saturday, July 16, 2011

Is it possible to use the extension method in Expression shape of BizTalk 2010

Charan: I have created one extension method  to count the no of words (separated by character space ,  dot or question mark)  in a string by following this link.

Now I want to know is it possible to use the extension method in Expression shape of BizTalk 2010http://i3.social.s-msft.com/Forums/resources/images/trans.gif?cver=1864.870%0d%0a.

This is the extension method I have created.

 And this is test code to execute test it.


Rohit: The answer is no and yes

In your test code you have declared the namespace (DemoExtensionMethodForString) for the static class (MyExtensions) created for the extension method (WordCount) by specifying it with the using statement and you can't use the using statement in the expression shape so you can't use it in the same way as you have used in your test code i.e. as instance method of string variable.

But your extension method is just a static method created in a static class so can be executed it in expression shape as shown below:

Any comments or suggestions are welcome.

Cheers
Rohit Sharma