none
how to add SOAP header in a SOAP request message in Biztalk through pipeline. RRS feed

  • Question

  • Hello everyone,

    I am using HTTP Adpater in send port to send the message where i am using custom Send Pipeline to send the SOAP header . I am using HTTP adapter because i need to deactivate the 100continue property which is available only on HTTP adapter. 

    inmsg.Context.Write("ExpectHttp100Continue", "http://schemas.microsoft.com/BizTalk/2003/http-properties", false);

    the Problem is that this is not working.

    how i am suppose to send the SOAP header through pipeline?



    • Edited by Gaur Sumit Monday, February 13, 2017 9:26 AM
    Monday, February 13, 2017 9:25 AM

Answers

  • I am using HTTP adapter because i need to deactivate the 100continue property which is available only on HTTP adapter. 


    You don't need to do that. UserHttpHeaders property can be used only to add new HTTP headers to
    outgoing request. It cannot remove properties that are set by default.

    The global machine.config file is found here:

    C:\WINDOWS\Microsoft.NET\Framework\<FrameworkVersion>\CONFIG\machine.config

    The following entry disables the use of the header:

    <system.net>
      <settings>
        <servicePointManager expect100Continue="false"/>
      </settings>
    </system.net>

    that allows you to stop sending this header for HttpWebRequest operations.

    Rachit Sikroria (Microsoft Azure MVP)

    Tuesday, February 14, 2017 3:24 AM
    Moderator

All replies

  • So, the actual header is just "Expect" so, try something like:

    inmsg.Context.Write("UserHttpHeaders", "http://schemas.microsoft.com/BizTalk/2003/http-properties", "Expect:");

    But, why do you think you need to do this?  Expect was never really implemented well and spec specifically recommends ambiguity.

    Have you tested this an got verification from the service owner that Expect is causing a problem?

    • Proposed as answer by SMSVikasK Monday, February 20, 2017 6:11 PM
    Monday, February 13, 2017 1:15 PM
  • I am using HTTP adapter because i need to deactivate the 100continue property which is available only on HTTP adapter. 


    You don't need to do that. UserHttpHeaders property can be used only to add new HTTP headers to
    outgoing request. It cannot remove properties that are set by default.

    The global machine.config file is found here:

    C:\WINDOWS\Microsoft.NET\Framework\<FrameworkVersion>\CONFIG\machine.config

    The following entry disables the use of the header:

    <system.net>
      <settings>
        <servicePointManager expect100Continue="false"/>
      </settings>
    </system.net>

    that allows you to stop sending this header for HttpWebRequest operations.

    Rachit Sikroria (Microsoft Azure MVP)

    Tuesday, February 14, 2017 3:24 AM
    Moderator