none
Developing a custom adapter for TCP IP RRS feed

  • Question

  • I am new to BizTalk Server 2006. I have a requirement to develop a custom adapter for TCP connection. I don't know from where to start. I saw this link http://technet.microsoft.com/en-gb/library/aa547606.aspx but its like throwing a hell lot of stuffs, don't know how they are telling to write code and where the code will be written.

     I didn't find a simple step wise tutorials to develop a Custom Adapter in BizTalk server for beginners. As compared to other MS technology there are very less number of online articles available for BizTalk Server.

     Any help will be highly appreciated.


    Sheo Narayan
    Monday, January 26, 2009 9:08 PM

Answers

  • Hi Sheo,

    BizTalk custom adapter development has to done very carefully.  The code for the custom adapter can be classified into two sections

    1. Transport protocol specific code. Try this code in a c# console application to ensure you can connect your system using C#.
    2. B izTalk specific code. This code includes both design time and runtime code. Design time codes are the codes which execute during the design time of the adapter. For  example, Similar to File adapter ‘s “Receive Folder”  property, your  adapter may have a design time properties like “Server name”, “User  ID”, “Password” which are configurable values during design time. And runtime codes are the code which execute during the runtime of the adapter. 

     

    When building a custom adapter, developers typically choose one of two different approaches. They take an adapter sample from the SDK and modify it, or they use the BizTalk Adapter Wizard (which use BizTalk Adapter Framework) . The easier option is using the adapter Wizard. This wizard would take inputs like Adapter name, namespace, design properties and creates the template project which will have most of the BizTalk code and deployment files like registry files required for your adapter. You have to write the t ransport protocol specific code inside the “ SubmitBatch() ” method for receive adapter.

    So actual coding should not take much time. But I would suggest having good time and plan for performance and stressing testing. Sometimes you might end up with threading related issues due to the transport protocol specific code, this might affect the throughput of your adapter. Try to use LoadGen to generate message transmission loads to run performance and stress tests for you adapter.

    First Step : Ensure you have good C# code to connect to your system and try using BizTalk Adapter Wizard. This Wizrard would be the good starting point. You will get along with the adapter development from the codes generated by the BizTalk Adapter Wizard

    Development Resource:

    BizTalk Adapter Wizard: http://biztalkadapterwizard.codeplex.com/


    Learning resources:

    Developing Custom Adpters: http://msdn.microsoft.com/en-us/library/aa559841%28v=BTS.10%29.aspx

    Developing Adapters using Adapter Framework: http://msdn.microsoft.com/en-us/library/ee268560%28BTS.10%29.aspx

    Developing Custom Adpter using BizTalk Adpter Framewok: http://msdn.microsoft.com/en-us/biztalk/bb545014

    Testing resources:

    LoadGen:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c8af583f-7044-48db-b7b9-969072df1689&displaylang=en

     

    Cheers
    M.R.ASHWINPRABHU

    If this answers your question please mark it accordingly


    Wednesday, February 16, 2011 11:19 AM
  • My adapter is a TCP client and is a solicit request-response adapter. I only have a receive location which will receive a request and eventually send a response using the same physical socket connection.

    I am not sure that you will be able to create a receive and a send adapter that will be able to send over the same physical socket connection. In the classical TCP/IP dapter thay used parties to do this see http://btstcpip.codeplex.com/discussions/207032. I do not know how you will do this in a custom WCF LOB adapter.

    If you can get around this problem then i don't see any problem running on dedicated hosts or the same host.

     

    Tuesday, April 12, 2011 1:01 AM

All replies

  • Why you might want to re-invent the wheel., use this: http://www.codeplex.com/BTSTCPIP (BizTalk Server 2006 TCPIP Adapter)

     


    Please mark answers that solve your problem.
    Tuesday, January 27, 2009 5:19 PM
  • Thanks for your Reply Firas. I had got that by googling it. But as I am very new to BizTalk so not lgetting any idea how to start with it. I have already installed it and it says to update the the config file but what to do after that?

     Is there any step wise tutorials of using it? or any documentation for this adapter (its not available on codeplex).

    thanks


    Sheo Narayan
    Tuesday, January 27, 2009 6:14 PM
  • You can find a user guide within the Adapter folder, i think it will help you to start. if you have any other specific question you can send it to this forum.

    -Firas


    Please mark answers that solve your problem.
    Tuesday, January 27, 2009 6:40 PM
  • Are you talking about C:\Program Files\Microsoft BizTalk Server 2006\SDK\Samples\AdaptersDevelopment\ folder? This has some sample tutorials, of course this might help for intermediate developers but just for beginers, I want to know jus ABC of developing adapter. I am just trying to learn from above folder, however if you come acorss any very basic urls, please provide. 

    Thanks.

    Sheo Narayan
    Wednesday, January 28, 2009 11:38 AM
  • This might help you:

    1- BizTalk Adapter Wizard for BizTalk Server 2006: http://www.codeplex.com/BizTalkAdapterWizard

    2- Developing Custom Adapters http://msdn.microsoft.com/en-us/library/aa559841.aspx


    Please mark answers that solve your problem.
    • Proposed as answer by edhickey Tuesday, February 17, 2009 12:09 AM
    Wednesday, January 28, 2009 12:16 PM
  • I am in process of using the Adapter, will update to this post once I am successful.

    Thanks

    Sheo Narayan
    Thursday, January 29, 2009 11:09 AM
  • Hi Sheo,

    BizTalk custom adapter development has to done very carefully.  The code for the custom adapter can be classified into two sections

    1. Transport protocol specific code. Try this code in a c# console application to ensure you can connect your system using C#.
    2. B izTalk specific code. This code includes both design time and runtime code. Design time codes are the codes which execute during the design time of the adapter. For  example, Similar to File adapter ‘s “Receive Folder”  property, your  adapter may have a design time properties like “Server name”, “User  ID”, “Password” which are configurable values during design time. And runtime codes are the code which execute during the runtime of the adapter. 

     

    When building a custom adapter, developers typically choose one of two different approaches. They take an adapter sample from the SDK and modify it, or they use the BizTalk Adapter Wizard (which use BizTalk Adapter Framework) . The easier option is using the adapter Wizard. This wizard would take inputs like Adapter name, namespace, design properties and creates the template project which will have most of the BizTalk code and deployment files like registry files required for your adapter. You have to write the t ransport protocol specific code inside the “ SubmitBatch() ” method for receive adapter.

    So actual coding should not take much time. But I would suggest having good time and plan for performance and stressing testing. Sometimes you might end up with threading related issues due to the transport protocol specific code, this might affect the throughput of your adapter. Try to use LoadGen to generate message transmission loads to run performance and stress tests for you adapter.

    First Step : Ensure you have good C# code to connect to your system and try using BizTalk Adapter Wizard. This Wizrard would be the good starting point. You will get along with the adapter development from the codes generated by the BizTalk Adapter Wizard

    Development Resource:

    BizTalk Adapter Wizard: http://biztalkadapterwizard.codeplex.com/


    Learning resources:

    Developing Custom Adpters: http://msdn.microsoft.com/en-us/library/aa559841%28v=BTS.10%29.aspx

    Developing Adapters using Adapter Framework: http://msdn.microsoft.com/en-us/library/ee268560%28BTS.10%29.aspx

    Developing Custom Adpter using BizTalk Adpter Framewok: http://msdn.microsoft.com/en-us/biztalk/bb545014

    Testing resources:

    LoadGen:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c8af583f-7044-48db-b7b9-969072df1689&displaylang=en

     

    Cheers
    M.R.ASHWINPRABHU

    If this answers your question please mark it accordingly


    Wednesday, February 16, 2011 11:19 AM
  • Have just finished writing a custom WCF LOB adapter that connects to a TCP/IP called the GVCLC adapter . It works well. I did not use the codeplex TCP/IP adapter because I had to receive and send requests to the same socket connection and because I was using BizTalk 2010.

    I extended Michael Stephenson's socket adapter example http://geekswithblogs.net/michaelstephenson/archive/2009/02/10/129302.aspx to be a request/response inbound socket adapter. I also followed the echo adapter example on how to use the WCF LOB adapter SDK at http://msdn.microsoft.com/en-us/library/bb798134(v=bts.10).aspx. In addition I had to dissemble the WCF SQL LOB adapter and the WCF SAP LOB adapter to see some patterns on how to do some things in these adapters.

    Unfortunately there is a lot you have to work out yourself because there are not many published examples of WCF LOB adapter code. I may blog about my custom adapter if I can get permission from the customer i wrote it for because I think another example for the Biztalk community might help somemone else.

    Good luck writing your custom adapter. If you have problems post to this group because I found everyone here very helpful when I tried to create my adapter.

    Friday, February 18, 2011 6:28 PM
  • Just curious, is there a special need for TCP/IP adapter? Is there a specific reason you cannot use WCF-NetTcp adapter?

    Tuesday, February 22, 2011 8:38 AM
  • Hello Mark,

    is your adapter a TCP Client or a TCP Server?

    We plan to make a TCP Socket adapter ,where actually the adapter should be a TCP Server.

    It should be a receive and a send adapter and we will receive and send over the same physical socket connection.

    That means ,when the receive location is enabled, then the TCP server works, when the Receive location is disabled, then it should stop the server.

    We plan implementing it with ordered delivery!

    But I saw in the Microsoft documentation ,that the receive and the send adapters should work on separate host instances.

    But as the adapter will most probably be in-process adapter, then the receive location and the sedn port must be on the same host. What is your openion?

     

    Best regards

    Vlado

    Monday, April 11, 2011 6:11 PM
  • My adapter is a TCP client and is a solicit request-response adapter. I only have a receive location which will receive a request and eventually send a response using the same physical socket connection.

    I am not sure that you will be able to create a receive and a send adapter that will be able to send over the same physical socket connection. In the classical TCP/IP dapter thay used parties to do this see http://btstcpip.codeplex.com/discussions/207032. I do not know how you will do this in a custom WCF LOB adapter.

    If you can get around this problem then i don't see any problem running on dedicated hosts or the same host.

     

    Tuesday, April 12, 2011 1:01 AM