Using the WCF-Custom Transport with webHttpBindingType RRS feed

  • Question

  • I want to use the WCF-Custom Transport type on a send port, using the Binding Type of "webHttpBinding".  This is because I need to control the maxBufferSize and transferMode settings, and this doesn't appear to be possible on the standard WCF-WebHttp transport type, but is on the WCF-Custom Transport.

    On the standard WCF-WebHttp transport type there is a "Http Method and Url Mapping" field.  However this isn't available when using the WCF-Custom transport.

    How do I go about setting the http method and url mappings.  


    Friday, October 28, 2016 10:45 AM

All replies

  • Hello Bill,

    In the configuration properties for the WCF-Custom port, set up your operation mapping like so:

      <Operation Name='OpName' Method='POST' Url='/OpName?param1={param1}&amp;id={id}' />

    Change the method attribute if necessary. Name should match the operation name on you receive or send port (just like any other WCF action mapping for BizTalk). Then, you can click on the edit button in the Variable Mapping... section.

    variable mapping sample

    You can also achieve this using Dynamic ports.


    /*Creating a new output message */
       output = input;                                       
       output(*)= input(*); 
    /*this part of the code defines how to set the variable mapping. The APC variable will contain the promoted property value. */
       output(WCF.VariablePropertyMapping)= @”<?xml version=’1.0′ encoding=’utf-16′?>
       <BtsVariablePropertyMapping xmlns:xsi=’’ xmlns:xsd=’’>
       <Variable Name=’APC’ PropertyName=’AirportCode’ PropertyNamespace=’https://TestDynamicPort.PropertySchema’ />
    /*Next we define the Outbound Message Property as in the Messages Tab in the send port */
    /*Define transport properties */
    /*Here we define the Action as we define in the General tab. Here my port is names as Port_2*/
       output(WCF.HttpMethodAndUrl)=@”<BtsHttpUrlMapping> <Operation Method=’GET’ Url=’status/{APC}?format=xml’ /></BtsHttpUrlMapping>”; 

    Rachit Sikroria (Microsoft Azure MVP)

    Friday, October 28, 2016 10:53 AM
  • Thanks for your quick response Rachit.

    I have looked at the WCF-Custom port and there is nowhere to put the BtsHttpUrlMapping information.

    There is a SOAP Action header field, however it this field does not accept BtsHttpUrlMapping information, only BtsActionMapping.

    You can put BtsHttpUrlMapping information on a send port when it is of type "WCF-WebHttp", but I can't see anywhere to put it on "WCF-Custom".


    Friday, October 28, 2016 11:30 AM
  • Well....why do you need to control maxBufferSize and transferMode?

    Friday, October 28, 2016 11:45 AM
  • Azure storage only allows files of up to 64mb to be written in a single put operation.  After that size the file must be chunked into blocks of no more than 4mb and then committed when all the blocks have been uploaded.  I was hoping that using the buffer might achieve this.

    But anyway my original question relates to why it is not possible to utilise BtsHttpUrlMapping settings on a wcf-custom transport type with webHttpBinding but perhaps only Microsoft may be able to answer that...

    Friday, October 28, 2016 2:29 PM