Install stuff in BizTalk Install Folder in custom MSI (Reminder to self)

/
March 22, 2010
/
Comments Off on Install stuff in BizTalk Install Folder in custom MSI (Reminder to self)

I once found this document via google. It covers how to create a custom installer that will install stuff in the BizTalk Installation Folder.
it explains how to read some registry setting (the installation folder of BizTalk) and how to incoperate that into the installer.

Today I needed it again, and it took me some time to find it. So as a reminder to myself I blog about it.

The title is : Creating MSIs to install into the BizTalk directory
Read more: http://blog.biztalk-info.com/archive/2008/02/01/Creating_MSIs_to_install_into_the_BizTalk_directory.aspx#ixzz0ivXODEsW

All credits go to Eric (don’t know his last name).

 

BizTalk 2006 R2 SP1 alters the disassembling behaviour of a Receive pipeline !

/
March 19, 2010
/
Comments Off on BizTalk 2006 R2 SP1 alters the disassembling behaviour of a Receive pipeline !

In my previous post I mentioned i noticed a change in the disassembling behaviour of BizTalk Server 2006 R2 after installing SP 1.

After I got home after work I sat down and looked somewhere on my harddisk for an old version of  a BizTalk 2006 Virtual PC. After a while I found one that was approximately  one and a half year untouched. So I sat down and Fired it up…

First get all the updates that have been since then, geeeeeez there have been many, I had about 80 of them and i completely forgot that some of them took ages to install (Visual Studio SP / Several Dotnet’s etc). Whel about two hours later i could test my scenario.

I created a solution and I copied (used cut & paste) the envelope and body from the previous post to this solution. Add a strong key, deploy and I was off to test.

With the pre SP1 BizTalk 2006 R2 (On Windows Server 2003 R2) I got the results I expected.

So i copied the entire VPC to a new location and added the extension SP1 to the machine name to distinguish it from the other. Then i downloaded and installed Service pack 1 for BizTalk 2006 R2.

After a reboot I was good to go….

To my dissapointment i got the same result as on work. Below is a

Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5719
Date:  3/19/2010
Time:  10:42:38 PM
User:  N/A
Computer: TITANNIC
Description:
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: “Pipeline ” Receive Port: “Batched Receive” URI: “C:ProjectsService Pack TestService Pack TestTestInput*.xml” Reason: The disassembler found an envelope that does not have the body element.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

So i can definitelye say : SP1 for BizTalk 2006 R2 alters the default disassembling behaviour ! ( And in my case broke my solution)

For everybody who wants to test, I have added a very small solution to demonstrate what goes wrong…..

BizTalk 2006 R2 SP1 -> Something changed in disassembling pipelines !

/
March 19, 2010
/
Comments Off on BizTalk 2006 R2 SP1 -> Something changed in disassembling pipelines !

Although I am still investigating this item i thought it would be nice to share it as soon as i find out something went wrong.

I have a very simple schema that returns data from the SQL adapter. I deployed an envelope schema and a schema that resembles the payload. Everything was working fine until I deployed SP1 to my developement server. Now all of a sudden I see stuff like this in the eventlog :

Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5753
Date:  3/19/2010
Time:  4:10:49 PM
User:  N/A
Computer: XXXXXX
Description:
A message received by adapter “FILE” on receive location “Receive Location2” with URI “D:TempTestEnvelope*.xml” is suspended.
 Error details: There was a failure executing the receive pipeline: “FH.CE.ESB.Core_v0100.Pipelines.FH_XML_ReceivePipeline, FH.CE.ESB.Core_v0100, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f703287a4fe098c” Source: “Pipeline ” Receive Port: “FH.CCE.FFS.RIS.SQL_FFS_DB_v0103” URI: “D:TempTestEnvelope*.xml” Reason: The disassembler found an envelope that does not have the body element.  
 MessageId:  {150B4635-125B-41B1-A622-9A989B055CD4}
 InstanceID: {E85DEE3D-F714-419D-B8AD-4E23E6530EAB}

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I have replaced the SQL receive with a file drop to reproduce the issue easier…. 

The message that I drop in looks like this :

 <utg_die_tra_v0103 xmlns=”http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103“>
  <utg_die_tra inf_soo_kde=”1″ inf_soo_typ_kde=”BT” inf_soo_vbg_kde=”351″ inf_soo_opd_kde=”2″ inf_soo_ogr_kde=”BBO” inf_soo_znd_kde=”FFS” inf_soo_vrz_dtm_tyd=”2010-03-10T11:51:42.173″ die_tra_tch_idf=”2061″ die_tra_amk_dtm_tyd=”2010-03-10T11:51:42.173″ die_tra_amk_mdm=”BBOBSK” klt_rol_kde=”K” klt_num=”167″ die_kde=”5702″ kor_tsg_ind=”C” inh_utb_ind=”I” val_kde=”EUR” die_tra_atl_ehd=”1″ die_tra_bdg=”.400″ die_tra_dtm=”2006-12-20T00:00:00″ kor_tsl_prc=”1.500″ gsg_bdg=”26.730″ cor_ind=”N” vel_kde=”1″ vel_vst_kde=”1″ dtm_gew_fac=”2010-02-27T00:00:00″ onz_ref_ord_num=”0″ uw_ref_ord_num=”068835032918a” uw_ref_lev_pty_idf=”6883532918a”/>
 </utg_die_tra_v0103>

and the schema’s look like this :

Notice I have set the body xpath to the rootnode….
<b:recordInfo body_xpath=”/*[local-name()=’utg_die_tra_v0103′ and namespace-uri()=’http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103′]” />

Envelope Schema :

<?xml version=”1.0″ encoding=”utf-16″?>
<xs:schema xmlns:b=”
http://schemas.microsoft.com/BizTalk/2003” xmlns=”http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103” attributeFormDefault=”unqualified” elementFormDefault=”qualified” targetNamespace=”http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103” version=”1.0″ xmlns:xs=”http://www.w3.org/2001/XMLSchema“>
  <xs:annotation>
    <xs:appinfo>
      <msbtssql:sqlScript value=”exec [ffs_dbs_get_rpt_utg_die_tra_esb_p] @max_atl_rec_pr=&quot;1&quot;, @vst_kde_pr=&quot;AMR&quot;” xmlns:msbtssql=”
http://schemas.microsoft.com/BizTalk/2003” />
      <b:schemaInfo is_envelope=”yes” />
    </xs:appinfo>
  </xs:annotation>
  <xs:element name=”utg_die_tra_v0103″>
    <xs:annotation>
      <xs:appinfo>
        <b:recordInfo body_xpath=”/*[local-name()=’utg_die_tra_v0103′ and namespace-uri()=’http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103′]” />
      </xs:appinfo>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q1=”
http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0100.Schemas.utg_die_tra_v0100” minOccurs=”0″ maxOccurs=”1″ name=”utg_die_tra” type=”utg_die_traType” />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name=”utg_die_traType”>
    <xs:attribute name=”inf_soo_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_typ_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_vbg_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_opd_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_ogr_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_znd_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_vrz_dtm_tyd” type=”xs:string” />
    <xs:attribute name=”die_tra_tch_idf” type=”xs:decimal” />
    <xs:attribute name=”die_tra_amk_dtm_tyd” type=”xs:string” />
    <xs:attribute name=”die_tra_amk_mdm” type=”xs:string” />
    <xs:attribute name=”klt_rol_kde” type=”xs:string” />
    <xs:attribute name=”klt_num” type=”xs:int” />
    <xs:attribute name=”die_kde” type=”xs:int” />
    <xs:attribute name=”kor_tsg_ind” type=”xs:string” />
    <xs:attribute name=”inh_utb_ind” type=”xs:string” />
    <xs:attribute name=”die_oms” type=”xs:string” />
    <xs:attribute name=”die_oms_avu_een” type=”xs:string” />
    <xs:attribute name=”die_oms_avu_twe” type=”xs:string” />
    <xs:attribute name=”die_tra_prs” type=”xs:decimal” />
    <xs:attribute name=”val_kde” type=”xs:string” />
    <xs:attribute name=”die_tra_atl_ehd” type=”xs:int” />
    <xs:attribute name=”die_tra_bdg” type=”xs:decimal” />
    <xs:attribute name=”frq_tyd_vak_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”frq_tyd_vak_wrd” type=”xs:int” />
    <xs:attribute name=”die_tra_dtm” type=”xs:string” />
    <xs:attribute name=”kor_tsl_prc” type=”xs:decimal” />
    <xs:attribute name=”ehd_kde” type=”xs:int” />
    <xs:attribute name=”gsg_bdg” type=”xs:decimal” />
    <xs:attribute name=”gsg_atl” type=”xs:decimal” />
    <xs:attribute name=”gsg_tli” type=”xs:string” />
    <xs:attribute name=”cor_ind” type=”xs:string” />
    <xs:attribute name=”vel_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”vel_vst_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”die_niv_een_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”die_niv_twe_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”dtm_gew_fac” type=”xs:string” />
    <xs:attribute name=”dtm_gre_fac” type=”xs:string” />
    <xs:attribute name=”onz_ref_doc_typ_kde” type=”xs:string” />
    <xs:attribute name=”onz_ref_doc_idf” type=”xs:string” />
    <xs:attribute name=”uw_ref_doc_typ_kde” type=”xs:string” />
    <xs:attribute name=”uw_ref_doc_idf” type=”xs:string” />
    <xs:attribute name=”onz_ref_ord_num” type=”xs:string” />
    <xs:attribute name=”uw_ref_ord_num” type=”xs:string” />
    <xs:attribute name=”onz_ref_lev_pty_idf” type=”xs:string” />
    <xs:attribute name=”uw_ref_lev_pty_idf” type=”xs:string” />
    <xs:attribute name=”tyd_dvr_tra_typ_kde” type=”xs:int” />
    <xs:attribute name=”btw_kde” type=”xs:string” />
    <xs:attribute name=”onz_ref_ord_pty_tch_idf” type=”xs:string” />
    <xs:attribute name=”onz_ref_lev_pty_tch_idf” type=”xs:string” />
  </xs:complexType>
</xs:schema>

Body Schema

<?xml version=”1.0″ encoding=”utf-16″?>
<xs:schema xmlns:b=”
http://schemas.microsoft.com/BizTalk/2003” xmlns=”http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103” attributeFormDefault=”unqualified” elementFormDefault=”qualified” targetNamespace=”http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103” version=”1.0″ xmlns:xs=”http://www.w3.org/2001/XMLSchema“>
  <xs:annotation>
    <xs:appinfo>
      <msbtssql:sqlScript value=”exec [ffs_dbs_get_rpt_utg_die_tra_esb_p] @max_atl_rec_pr=&quot;1&quot;, @vst_kde_pr=&quot;AMR&quot;” xmlns:msbtssql=”
http://schemas.microsoft.com/BizTalk/2003” />
      <b:schemaInfo root_reference=”utg_die_tra” xmlns:b=”
http://schemas.microsoft.com/BizTalk/2003” />
    </xs:appinfo>
  </xs:annotation>
  <xs:element name=”utg_die_tra” type=”utg_die_traType”>
    <xs:annotation>
      <xs:appinfo>
        <b:properties>
          <b:property distinguished=”true” xpath=”/*[local-name()=’utg_die_tra’ and namespace-uri()=’http://FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.Schemas.utg_die_tra_v0103′]/@*[local-name()=’inf_soo_opd_kde’ and namespace-uri()=”]” />
        </b:properties>
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:complexType name=”utg_die_traType”>
    <xs:attribute name=”inf_soo_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_typ_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_vbg_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_opd_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_ogr_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_znd_kde” type=”xs:string” />
    <xs:attribute name=”inf_soo_vrz_dtm_tyd” type=”xs:string” />
    <xs:attribute name=”die_tra_tch_idf” type=”xs:decimal” />
    <xs:attribute name=”die_tra_amk_dtm_tyd” type=”xs:string” />
    <xs:attribute name=”die_tra_amk_mdm” type=”xs:string” />
    <xs:attribute name=”klt_rol_kde” type=”xs:string” />
    <xs:attribute name=”klt_num” type=”xs:int” />
    <xs:attribute name=”die_kde” type=”xs:int” />
    <xs:attribute name=”kor_tsg_ind” type=”xs:string” />
    <xs:attribute name=”inh_utb_ind” type=”xs:string” />
    <xs:attribute name=”die_oms” type=”xs:string” />
    <xs:attribute name=”die_oms_avu_een” type=”xs:string” />
    <xs:attribute name=”die_oms_avu_twe” type=”xs:string” />
    <xs:attribute name=”die_tra_prs” type=”xs:decimal” />
    <xs:attribute name=”val_kde” type=”xs:string” />
    <xs:attribute name=”die_tra_atl_ehd” type=”xs:int” />
    <xs:attribute name=”die_tra_bdg” type=”xs:decimal” />
    <xs:attribute name=”frq_tyd_vak_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”frq_tyd_vak_wrd” type=”xs:int” />
    <xs:attribute name=”die_tra_dtm” type=”xs:string” />
    <xs:attribute name=”kor_tsl_prc” type=”xs:decimal” />
    <xs:attribute name=”ehd_kde” type=”xs:int” />
    <xs:attribute name=”gsg_bdg” type=”xs:decimal” />
    <xs:attribute name=”gsg_atl” type=”xs:decimal” />
    <xs:attribute name=”gsg_tli” type=”xs:string” />
    <xs:attribute name=”cor_ind” type=”xs:string” />
    <xs:attribute name=”vel_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”vel_vst_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”die_niv_een_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”die_niv_twe_kde” type=”xs:unsignedByte” />
    <xs:attribute name=”dtm_gew_fac” type=”xs:string” />
    <xs:attribute name=”dtm_gre_fac” type=”xs:string” />
    <xs:attribute name=”onz_ref_doc_typ_kde” type=”xs:string” />
    <xs:attribute name=”onz_ref_doc_idf” type=”xs:string” />
    <xs:attribute name=”uw_ref_doc_typ_kde” type=”xs:string” />
    <xs:attribute name=”uw_ref_doc_idf” type=”xs:string” />
    <xs:attribute name=”onz_ref_ord_num” type=”xs:string” />
    <xs:attribute name=”uw_ref_ord_num” type=”xs:string” />
    <xs:attribute name=”onz_ref_lev_pty_idf” type=”xs:string” />
    <xs:attribute name=”uw_ref_lev_pty_idf” type=”xs:string” />
    <xs:attribute name=”tyd_dvr_tra_typ_kde” type=”xs:int” />
    <xs:attribute name=”btw_kde” type=”xs:string” />
    <xs:attribute name=”onz_ref_ord_pty_tch_idf” type=”xs:string” />
    <xs:attribute name=”onz_ref_lev_pty_tch_idf” type=”xs:string” />
  </xs:complexType>
</xs:schema>

The solution is set up analog to the solution decribed by Richard Seroter here : http://seroter.wordpress.com/2007/01/03/debatching-inbound-messages-from-biztalk-sql-adapter/

This item is still under  investigation, expect a follow up…..

 

No longer Copy Local That Biztalk Reference !!!!!!!

/
January 25, 2010
/
Comments Off on No longer Copy Local That Biztalk Reference !!!!!!!

On monday 19 january I gave a presentation to the dutch BizTalk User Group (BTUG) about he BizTalk Best Practices. The Best Practices are a set of components, a loosly coupled architecture and a software factory that supports the components and the architecture.

The presentation went very well and for sure I had to demo something. And while i was demoing i had a lot of trouble with the references. Normally i don’t have these problems during a demo cause then i build the complete solution in about half an hour. (including deployment & stuff). But this time I had only 10 minutes to demo, so i had set up some stuff (and tested) in pre set up projects….

But then i got red circles everywhere in my orchestrations. This was cause by the problem described excellent in this post : “Copy Local That BizTalk Reference” by Pim Waaijenberg.

Then today I read my rss feeds in BlogLines (great web based reader) feeds and there I saw this post : Hotfix for BizTalk 2009 and Visual Studio 2008 issues released.

So it seems my demo came just a few days too early…(or this fix was a few days too late !).

Anyway it seems the problemis solved.

 [edit]

I saw my BizTalk Collegue Jean Paul Smit already blogged about this. He was not able to sit through the whole BTUG meeting so i don’t know if he saw me with this problem. He has a nice entry about it explaing what is solved. Have a read of his post here : http://bloggingabout.net/blogs/jpsmit/archive/2010/01/25/hotfix-for-biztalk-server-2009-development-environment.aspx

BizTalk Server future sneak peak

/
November 11, 2009
/
Comments Off on BizTalk Server future sneak peak

Well some people are still not convinced BizTalk is here to stay, today some very nice information popped up in bloglines (my favorite RSS reader) about the futur of BizTalk. Almost every new technology MS has released are mentioned, to name a few:

  • WCF
  • WF
  • Future plans Pub/Sub pattern
  • StreamInsight

Have a read of this post >>Click<<

Ugly….. Xsd Import causes DummyVar warnings during compile time in BizTalk *UGLY*

/
September 8, 2009
/
Comments Off on Ugly….. Xsd Import causes DummyVar warnings during compile time in BizTalk *UGLY*

I am busy creating a BizTalk Software factory for BizTalk 2009.

So instead of going through all kinds of repeatable steps,

  1. enter data,
  2. do some more stuff,
  3. add pesky references
  4. do more stuff,
  5. add a map,
  6. add another map,
  7. add an orchestration,
  8. Start from step 2 again

I have those steps nicely put into a wizard. You enter data once and a complete orchestration with maps is generated. Very nice indeed.
Everything works fine but you have to look very carefully into all kind of compile errors.
So during compilation of my testproject I saw some very ugly warnings….

Warning cs0169: The field BlaBlaBla__DummyVar0 is never used.
Warning cs0169: The field BlaBlaBla__DummyVar1 is never used.
Warning cs0169: The field BlaBlaBla__DummyVar2 is never used.
Warning cs0169: The field BlaBlaBla__DummyVar3 is never used.
Warning cs0169: The field BlaBlaBla__DummyVar4 is never used.

I was curious about this Warning and didn’t know if it was caused by my software Factory or was just default behaviour.
So I started to investigate. And the results are pretty UGLY

You will get one of those DummyVar warning for every schema that is included in your current Schema !

Microsoft this is plain UGLY….

Gjeeeeez, Guidance automation and VS 2008 SP1, Thank Google for that !

/
September 7, 2009
/
Comments Off on Gjeeeeez, Guidance automation and VS 2008 SP1, Thank Google for that !

When you are working with the Guidance Automation toolkit, you are creating all kind of wizards yoursef.

Currently I am in the middle of doing so and after adding a specific recipe to create a Biztalk Project I got the following error :”project creation failed”  
So I tried to create a BizTalk project without my custom wizard and I got the same error.

I googled around a bit on : project creation failed

And i found the following post that everybody is referring to : http://petesbloggerama.blogspot.com/2007/10/visual-studio-2008-orcas-creation.html

Unfortunately this didn’t solve the problem. After googeling some more I found this : http://blogs.msdn.com/kerreybpi/archive/2009/05/12/biztalk-error-project-creation-failed.aspx

This one states that after installing Visual Studio SP 1 you have to reinstall the specific BizTalk components. 
Then I remembered that before I shut down my Virtual Machine the last time I Installed SP1.

I am currently re-installing BizTalk to see if that solved the problem. If it does I am a happy man, and somethimes I think : Thank ‘Google’ for that…….

Custom BAM and making it really work

/
July 20, 2009
/
Comments Off on Custom BAM and making it really work

I have a solution where I use BAM to build a complete audit trail of a message flow.

Custom components write a message to a predefined BAM view whenever you want it to. Normal points where you would use
this functionality is in receive & send pipelines. And if an important business decision was made you could write that to the
audit trail as well. Below is an example of how to do this in an expression shape inside an orchestration.

AuditData(XlangMessage,”The order was rejected because of <Some reason>”,bool includeMessage)

By doing it like this you can have a very nice Audit trail for every BizTalk solution without doing too much for it. I was very happy with the Audit trail
created by the applications that used the custom BAM solution. However a person dealing mainly with functional support would want some
added functionality. The wish to add functionality to an entry in BAM stayed in the back of my head and after a while I read a very good article by Gregory van de Wiele
and thought it would be nice to indeed have links that really worked.

 After applying his tips I was able to add some extra functionality to the BAM page. Below is an example of this.

  • View Audit trail in Audit portal is a hyperlink that will jump to a website that is designed to show an audit trail of a message.
  • View Errors in FaultPortal (If any) will show all the errors that have occurred.
  • View entire message will use Gregory’s tip and show you the entire message. (the field longreferencedata contains the original message)
    Below is an example of this.

 So now i was able to give the end user some useful information. He could see the entire audit trail in the Audit Portal
(which is just another faster view on the same BAM table) , See messages in the FaultPortal (if there were any) and
he could see the entire message. But what if the end user had a question about this record.
There is a nice button on the bottom of this screen ‘Request technical assistance’. as seen in the screenshot below.

I clicked this button to see what would happen, but the only thing I could see was the following message.

BAM would give me only a message stating that some of the reference data was not found. What kind of reference data I was wondering.
So I did the same as Gregory, and did some reflection on BAM. And then it became clear to me. Since the entry in BAM was not put there via a regular tracking profile,
some data needed there was not present. After some sniffing around with Reflector i could see that the ‘Technical Assistance’ button
was relying on ‘BizTalkService’ and ‘MessageId’ (all case sensitive). So I used Gregory’s post to fill those as well.

 After these adaptations the entry in BAM has gained in functionality.

  • Show complete Audit trail
  • Show errors if there are any
  • Show entire message
  • Call for technical assistance

So a person who is dealing with mainly functional issues could see all the date he needs to see. And if he thinks a problem has a technical background,
he could call the guys who are responsible for the technical support like this.

This will result in a message in the eventlog like this :

If the people who are responsible for technically monitoring BizTalk have SCOM setup properly they could
easily have an alert raised for these kind of messages and respond to them.
So you will have a link from functional support to technical support without doing anything for it.

About EDI / Property Schemas and Validate instance

/
May 11, 2009
/
Comments Off on About EDI / Property Schemas and Validate instance

In the future we need to process EDI documents so I am currently looking at some EDI Samples.

  • I did some tutorials (from Pro EDI in BizTalk Server 2006 Apress) and I created my own EDI schema based on X12_00401_810 (Exercise 1.0 to 1.4)
  • Then I had to create my own PropertySchemas to promote some nodes (Exercise 1.5)
  • Then I had to validate an instance of the schema i had just created….(Exercise 1.6 to 1.7)

But no matter what I did, I kept getting the same error over and over again. The errors were :

Invoking component…
D:XXXSchemasX12_BatchSchema.xsd: error BEC2004: Object reference not set to an instance of an object.
D:XXXSchemasX12_BatchSchema.xsd: error BEC2004: Validate Schema failed for file: <file:///D:XXXSchemasX12_BatchSchema.xsd>.
D:XXXSchemasX12_BatchSchema.xsd: error BEC2004: Validate Instance failed for schema X12_BatchSchema.xsd, file: <file:///C:Apress.IntegrationChapter 1Test DocumentsValid-Input.txt>.
Component invocation succeeded.

So I googled around a bit and tried to create a new solution. This has helped somebody who whas experiencing the same problems. But it Didn’t help me. The same rror keept popping up.

Only when I removed the property schema from my solution (created in 1.5) everything worked as expected. So since there is very little docuementation on this behaviour I hope this can help anybodu in the future.

 

 

 

Building your own Adapter. Serious Pitfals / Adapter WOES !!

/
March 31, 2009
/
Comments Off on Building your own Adapter. Serious Pitfals / Adapter WOES !!

This blog post is about several experiences I had when building my own Sybase adapter.

Normally i would suggest to the customer that they should buy an adapter, but in this case that was not possible since the only good working Adapter for Sybase was produced by TopXML and they vanished from this globe…. So I had to start building my own.

If you do a couple of searches on google you will probably find the BizTalk Adapter Wizard on codeplex. This is a good start cause it helps you a great deal in getting the framework four your adapter up and running in no time. However there are some dangers involved in using the wizard. One of the problems caused by the Adapter Wizard is the dreaded “The transport proxy method DeleteMessage() failed for adapter XYZ (Bug in Codeplex Adapter Wizard)” message wich I blogged about previously.

To describe this problem in the shortest possible form I could say, it copies ALL of the context from the message beeing send to the response message (request response port) so everything, messageID and stuff are all exactly the same. At a point in time BizTalk wants to delete a message with a specific ID and it finds two messages with that ID. This will probably result in several strange messages in the eventlog and sometimes even cycle your complete BizTalk Server. This is not the behaviour that you want.

Fortunately the solution is pretty simple, If you look at the generated code you will see a method named BuildResponseMessage. In this method the copying of the context is done. Simply remove the last statement from the method (btsResponse.Context = context😉 and your adapter is cured from this obscure problem.

Then I thought everything would run well and I started to submit Loads of requests against my new adapter. And that’s when the problems really started. To explain a littlebit what happened i have to explain what I did as the first step in my Adapter.

The first thing my adapter would do is read the incoming stream (from the pipeline) and load that up into a XML document. And i could see that stap failing in high volume scenario’s. I would see this step fail with several errors in the eventlog. Errors i saw in the eventlog were:

  • There are multiple root elements
  • Root element is missing
  • Tag is missing
  • And many more variants

This was pretty obscure cause I was sending the same XML file (via passthrough pipelines) in a high volume. And all my XML files were correct. !! This made me believe there was something wrong with BizTalk cause my streams that should contain valid XML were all messed up…

So I had a look at the HTTP adapter that comes with the SDK and I compiled it and set it up so it would call a web service over HTTP. And for sure within an hour i was up and running and my webservice gave the correct response. Again all with passthrough pipelines so BizTalk should not touch the message at all. And When i ran a High Volume of messages over this new connectio i got EXACTLY the same problem. So now i knew it was not my code messing stuff up, but it was some more generic problem.

Since I am not the right developer to look at the inner workings of the adapterframework, I called MS for help. At first they were reulctant to help, (cause they were just samples). After some help from the guys from MS Netherland the issue was pushed through and and the guys from MS finally came through with a solution. It took quite some time for MS to solve this one and I guess they are probably the ony people on earth who could have solved the problem….

So here is what they changed: (Original First)

        public override IBaseMessage ProcessMessage(IBaseMessage message)
        {
                this.solicitMsg = message;
                HttpAdapterProperties props = new HttpAdapterProperties(message, this.propertyNamespace);
                IBaseMessage responseMsg = null;
                if (props.IsTwoWay)
                {
                    WebResponse response = SendHttpRequest(this.solicitMsg, props);
                    responseMsg = BuildResponseMessage(response);
                }
                else
                {
                    WebResponse response = SendHttpRequest(this.solicitMsg, props);
                    response.Close();
                }
                return responseMsg;
            }
        }

 They changed it into :

        public override IBaseMessage ProcessMessage(IBaseMessage message)
        {
                HttpAdapterProperties props = new HttpAdapterProperties(message, this.propertyNamespace);
                IBaseMessage responseMsg = null;
                if (props.IsTwoWay)
                {
                    WebResponse response = SendHttpRequest(message, props);
                    responseMsg = BuildResponseMessage(response);
                }
                else
                {
                    WebResponse response = SendHttpRequest(message, props);
                    response.Close();
                }
 
                return responseMsg;
        }

After applying this change the HTTP adapter would immediately work as expected. So I tried the change in my own Sybase adapter and BINGO…. everything worked as expected.

So I have learned a lot from building this adapter. Some TakeAway’s

  • Really stress test your adapters (With100 messages everything would run fine ..)
  • If you have done the first step, multiply the number of messages with 10 and see what happens…
  • Codeplex and stuff to make you more productive are nice, but they have bugs in them as well..
  • Samples from MS are not flawless either. (Expect an update from MS in the future)

So with this post I hope to help several people who have run into problems when creating custom BizTalk adapters….

The only thing I really don’t get is why this code change would have such a dramatic impact…..

 

  • Recent Posts
  • Recent Comments
  • Archives
  • Categories
  • Meta