3

I'm trying to create a Send Port using the BizTalk Management API (from BizTalk 2016, feature pack 2). But I have the following issue: a Send Port has a PrimaryTransport (standard on Send Ports) and a SecondaryTransport (in BizTalk UI: Backup Transport). The SecondaryTransport will be based on an optional URL. I can create the Send Port with the SecondaryTransport being null (using both Swagger and C#), showing the following: BizTalk Send Port Backup Transport

But I can't update the Send Port afterwards as I'm getting the following when I try setting the SecondaryTransport/Backup Transport through C# or Swagger or BizTalk's UI NullReference

I've tried putting "None", "", "NONE", "" as TransportType, but those aren't valid adapters. This is the configuration in Swagger for the SecondaryTransport itself:

"SecondaryTransport": {
      "Address":"",
      "TransportType": "NONE",
      "TransportTypeData": null,
      "SendHandler": "BizTalkServerApplication",
      "RetryCount": 3,
      "RetryInterval": 5,
      "OrderedDelivery": false,
      "Schedule": {
        "ServiceWindowEnabled": false,
        "FromTime": "2018-07-22T22:00:00",
        "ToTime": "2018-07-23T21:59:59"
      }
    },

Does anyone have any experience on what I could fill in to be able to fill in my Backup Transport afterwards? (And so it doesn't look like it doesn't have any options anymore)

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
bhoubraken
  • 51
  • 3
  • Have you tried setting the secondary transport to actual valid details? e.g. TransportType actualyl being a valid type. Also BizTalk 2013 R2 the Type is shown as , could you try that? Also try omitting the TransportType & TransportData elements if you want None. – Dijkgraaf Jul 24 '18 at 20:49
  • Setting the secondary transport to actual valid details only works if during creation valid details were filled in as well (meaning there is a secondary transport). If this was created/updated with the above, then an update to valid details will fail. I've also tried the (doesn't show in the text above, appareantly), but that gives me the message it isn't a valid adapter. Omitting the TransportType & TransportData (Address filled as shown above) also gives me "Adapter is not a valid adapter.". I'm open for more suggestions if you have? – bhoubraken Jul 25 '18 at 08:22
  • So, I would not be at all surprised if you're the only one to ever actually try this. Is this for some production purpose or are you just fiddling around? – Johns-305 Jul 25 '18 at 11:53
  • It is, sadly, for a production purpose. Someone needs be able to dynamically create send ports through a Web API I've written on top of the BizTalk Management API. The data they give will be used as basis, but the address for the Backup Transport is optional, so this is all based on the scenario where someone leaves it empty at some point, but later on wants a backup transport set up, which brought me to this problematic... – bhoubraken Jul 25 '18 at 12:51
  • 1
    I think this is a bug in the management API. I could reproduce your problem and tried both creating the port without secondary transport and update the port (removing the secondary transport) - same problem. Then I checked the code for Microsoft.BizTalk.ManagementService.dll and both Create and Update behave the same: If the secondary transport != null the Transport Type value will be checked against known "Protocol types" (adapters) - which will of course fail. – David Abrahamsson Jul 25 '18 at 14:15
  • David, I'm glad that someone else was able to reproduce this problem. Is it possible that updating a send port without a secondary transport to one with a valid transport, it will validate the Transport Type against some property from the first secondary transport (like the adapters) ? Because I find it odd that, when I try to GET the SendPort through the API, the Secondary Transport is different from null, but the properties of the secondary transport are filled in (with null). – bhoubraken Jul 26 '18 at 07:11

0 Answers0