locked
WCF-WebHttp dynamic URL and Dynamic Header/Behavior configuration. RRS feed

  • Question

  • HI,

    I have an requirement to integrate with the REST Services in BizTalk Server 2013 R2, And This REST Service URL and HTTP Headers will differs per message. So I had created an Orchestration with the Dynamic Request-Response port and assign the properties in Message Assignment Shape. However while testing HTTP Headers were not added to service request message.

    I had tried with create Custom endpoint behaviour and assigned this behaviour to service request in Orchestration, however this property also not assigned from the Orchestration.

    Is this a bug for WCF-WebHttp Adapter? Is any other options to achieve my requirement?

    Thanks,

    Raj


    Praveen

    Tuesday, January 13, 2015 6:03 PM

Answers

  • Hi Praveen,

    Its a known bug already reported to Microsoft. 

    BizTalk 2013 servers that have been upgraded from BizTalk 2010 are missing some of the new global properties including HttpHeaders properties because of this even in orchestration we cannot change the HttpHeaders on messages.

    As a workaround WCF behavior extension can be used to solve this problem.

    Which can be downloaded from here.

    For the detailed explanation, I would adivce you to follow the below link on how to dynamically change the WCF-HttpHeaders for WCF-WebHTTP adapter.

    Dynamic WCF-HttpHeaders for WCF WebHttp adapter

    There is already a discussion going on around this on another post. Ashwin has also recommend to use custom pipeline component as a work around .

    Refer: BizTalk WCF-WebHttp Custom Headers per message

    Rachit


    Please mark as answer or vote as helpful if my reply does


    Tuesday, January 13, 2015 6:19 PM
    Moderator

All replies

  • Hi Praveen,

    Its a known bug already reported to Microsoft. 

    BizTalk 2013 servers that have been upgraded from BizTalk 2010 are missing some of the new global properties including HttpHeaders properties because of this even in orchestration we cannot change the HttpHeaders on messages.

    As a workaround WCF behavior extension can be used to solve this problem.

    Which can be downloaded from here.

    For the detailed explanation, I would adivce you to follow the below link on how to dynamically change the WCF-HttpHeaders for WCF-WebHTTP adapter.

    Dynamic WCF-HttpHeaders for WCF WebHttp adapter

    There is already a discussion going on around this on another post. Ashwin has also recommend to use custom pipeline component as a work around .

    Refer: BizTalk WCF-WebHttp Custom Headers per message

    Rachit


    Please mark as answer or vote as helpful if my reply does


    Tuesday, January 13, 2015 6:19 PM
    Moderator
  • Hi,

    As per my requirement, my REST Service URL will differs based on the input customer type. Based on my business requirement new customer types will added frequently. Because of this I am preferring to use the Dynamic Request-Response port and maintain the URLs in config file.

    I tried with

    1) I had created the custom WCF Endpoint Behavior, and assigned the WCF.EndpointBehaviorConfiguaration property in Orchestration's Message assignment shape.

    2) I had created a custom pipeline component to write HttpHeaders context property in Icomponent Execute method. And used this component send pipeline for the dynamic Request-Response port.

    In both the cases, HttpHeaders not assigned to Request message. However its working fine for Static Request-Response port. Is any approach for dynamic WCF-WebHttp adapter?


    Praveen

    Wednesday, January 14, 2015 7:04 PM
  • I have scratched my head for almost 20 days and by clubbing all blog post solution came.

    Follow below link of my blog  and you will get what is needed.

    https://ajayvyasblog.wordpress.com/2016/05/14/dynamic-header-while-consuming-rest-service-in-biztalk/

    if this site does not work check at below:

    http://vajvyas.blogspot.in/2016/06/dynamic-header-while-consuming-rest.html


    • Edited by Ajay Vyas Wednesday, June 1, 2016 5:25 PM
    Saturday, May 14, 2016 12:37 PM