You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IFTSTA.EDISend.btp.cs 7.0KB

1 week geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. namespace TM.Bosman.Pipelines
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using Microsoft.BizTalk.PipelineOM;
  6. using Microsoft.BizTalk.Component;
  7. using Microsoft.BizTalk.Component.Interop;
  8. public sealed class IFTSTA_EDISend : Microsoft.BizTalk.PipelineOM.SendPipeline
  9. {
  10. private const string _strPipeline = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Document xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instanc"+
  11. "e\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" MajorVersion=\"1\" MinorVersion=\"0\"> <Description /> "+
  12. " <CategoryId>8c6b051c-0ff5-4fc2-9ae5-5016cb726282</CategoryId> <FriendlyName>Transmit</FriendlyName"+
  13. "> <Stages> <Stage> <PolicyFileStage _locAttrData=\"Name\" _locID=\"1\" Name=\"Pre-Assemble\" minO"+
  14. "ccurs=\"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e4101-4cce-4536-83fa-4a5040674ad6\" /> <Co"+
  15. "mponents> <Component> <Name>PipelineComponents.ESBTrackingComponent,TM.Shared.Pipeli"+
  16. "neComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d</Name> <Com"+
  17. "ponentName>ESBTrackingComponent v1.2</ComponentName> <Description>Custom Pipeline Component"+
  18. " used to log messages instead of DTA Tracking</Description> <Version>1.2.0.0</Version> "+
  19. " <Properties> <Property Name=\"PipelineDirection\"> <Value xsi:type=\"xsd:s"+
  20. "tring\">OUTGOING</Value> </Property> <Property Name=\"PipelineSolution\"> "+
  21. " <Value xsi:type=\"xsd:string\">TM.Bosman</Value> </Property> <Property Nam"+
  22. "e=\"PipelineService\"> <Value xsi:type=\"xsd:string\">SEND</Value> </Property> "+
  23. " <Property Name=\"PipelinePhase\"> <Value xsi:type=\"xsd:string\">IN</Value> "+
  24. " </Property> </Properties> <CachedDisplayName>ESBTrackingComponent v1.2</Cach"+
  25. "edDisplayName> <CachedIsManaged>true</CachedIsManaged> </Component> </Component"+
  26. "s> </Stage> <Stage> <PolicyFileStage _locAttrData=\"Name\" _locID=\"2\" Name=\"Assemble\" minOc"+
  27. "curs=\"0\" maxOccurs=\"1\" execMethod=\"All\" stageId=\"9d0e4107-4cce-4536-83fa-4a5040674ad6\" /> <Comp"+
  28. "onents> <Component> <Name>Microsoft.BizTalk.Edi.Pipelines.EdiAssembler,Microsoft.Biz"+
  29. "Talk.Edi.PipelineComponents, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</Name"+
  30. "> <ComponentName>EDI Assembler</ComponentName> <Description>EDI Assembler</Descrip"+
  31. "tion> <Version>1.1</Version> <Properties> <Property Name=\"OverrideFallb"+
  32. "ackSettings\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> "+
  33. " <Property Name=\"XmlSchemaValidation\"> <Value xsi:type=\"xsd:boolean\">false</Value> "+
  34. " </Property> <Property Name=\"EdiDataValidation\"> <Value xsi:type=\"x"+
  35. "sd:boolean\">true</Value> </Property> <Property Name=\"AllowTrailingDelimiters\">"+
  36. " <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Propert"+
  37. "y Name=\"CharacterSet\"> <Value xsi:type=\"xsd:string\">UTF8</Value> </Property>"+
  38. " </Properties> <CachedDisplayName>EDI Assembler</CachedDisplayName> <Cach"+
  39. "edIsManaged>true</CachedIsManaged> </Component> </Components> </Stage> <Stage> "+
  40. " <PolicyFileStage _locAttrData=\"Name\" _locID=\"3\" Name=\"Encode\" minOccurs=\"0\" maxOccurs=\"-1\" execMet"+
  41. "hod=\"All\" stageId=\"9d0e4108-4cce-4536-83fa-4a5040674ad6\" /> <Components /> </Stage> </Stage"+
  42. "s></Document>";
  43. private const string _versionDependentGuid = "e04ecc98-f0a6-4459-ae46-c36b60212486";
  44. public IFTSTA_EDISend()
  45. {
  46. Microsoft.BizTalk.PipelineOM.Stage stage = this.AddStage(new System.Guid("9d0e4101-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
  47. IBaseComponent comp0 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.ESBTrackingComponent,TM.Shared.PipelineComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d");;
  48. if (comp0 is IPersistPropertyBag)
  49. {
  50. string comp0XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  51. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties> <Property Name=\"PipelineDirecti"+
  52. "on\"> <Value xsi:type=\"xsd:string\">OUTGOING</Value> </Property> <Property Name=\"PipelineSo"+
  53. "lution\"> <Value xsi:type=\"xsd:string\">TM.Bosman</Value> </Property> <Property Name=\"Pipel"+
  54. "ineService\"> <Value xsi:type=\"xsd:string\">SEND</Value> </Property> <Property Name=\"Pipeli"+
  55. "nePhase\"> <Value xsi:type=\"xsd:string\">IN</Value> </Property> </Properties></PropertyBag>";
  56. PropertyBag pb = PropertyBag.DeserializeFromXml(comp0XmlProperties);;
  57. ((IPersistPropertyBag)(comp0)).Load(pb, 0);
  58. }
  59. this.AddComponent(stage, comp0);
  60. stage = this.AddStage(new System.Guid("9d0e4107-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
  61. IBaseComponent comp1 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("Microsoft.BizTalk.Edi.Pipelines.EdiAssembler,Microsoft.BizTalk.Edi.PipelineComponents, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");;
  62. if (comp1 is IPersistPropertyBag)
  63. {
  64. string comp1XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  65. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties> <Property Name=\"OverrideFallbac"+
  66. "kSettings\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <Property Name=\"XmlSch"+
  67. "emaValidation\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property Name=\"E"+
  68. "diDataValidation\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <Property Name="+
  69. "\"AllowTrailingDelimiters\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Prope"+
  70. "rty Name=\"CharacterSet\"> <Value xsi:type=\"xsd:string\">UTF8</Value> </Property> </Properties"+
  71. "></PropertyBag>";
  72. PropertyBag pb = PropertyBag.DeserializeFromXml(comp1XmlProperties);;
  73. ((IPersistPropertyBag)(comp1)).Load(pb, 0);
  74. }
  75. this.AddComponent(stage, comp1);
  76. }
  77. public override string XmlContent
  78. {
  79. get
  80. {
  81. return _strPipeline;
  82. }
  83. }
  84. public override System.Guid VersionDependentGuid
  85. {
  86. get
  87. {
  88. return new System.Guid(_versionDependentGuid);
  89. }
  90. }
  91. }
  92. }