none
BizTalk -GET Uri length limitation RRS feed

  • Question

  • Hi Experts,

    Q1. Using BizTalk 2013 R2 to expose as REST API with JSON. When GET url length is more than 256 its limits because the GET method put the url into WCF-Property of "To" context value. I think this should not be restricted. Please suggest the solutions. Would this limitation be fixed in BizTalk 2016 release? . I understand that using POST method will be solution but using POST for the GET is against the REST principle that I don't want to go with.

    Q2. What are the way to set GET url parameter as optional. Below example, I want to set up param 2 as optional.

    <BtsHttpUrlMapping>
    < Operation Name="Operation1" Method="GET" Url="/param1/{param1}/param2{param2}/param3{param3}" />
    < /BtsHttpUrlMapping>

    Regards,

    Upadhyay A.

    Thursday, September 29, 2016 3:16 AM

Answers

All replies

  • Hi Ashwin,

    Q1) The promoted properties have a chatracter restriction, it has been that way till now for each of the promtoed property..stock or custom doesnt matter for that..if that will be fixed in Biztalk 2016 or not is smoething that MS can only comment.

    But I have to ask why do you have a such a long uri to begin with???

    @2) You have to have dynamic send port to achieve the dynamic setting of the paramter because,

    the Biztalk webhttp send port will redirect the message to an api based on the operation name in the BTS action mapping blob in the configuration,

    So one way is to configure multiple operations in the BTS action mapping blob at the physical send port and that will solve your issue, or other way is

    have a dynamic send port and set the properties inside an orch.

    refer How to call RESTFULL service using Dynamic Ports with Variable Mapping in WCF-WebHttp Adapter

    Regards,


    Mandar Dharmadhikari

    Thursday, September 29, 2016 6:40 AM
  • Hi Mandar,

    Thanks for the reply.

    We have multiple GET params and its values altogether along with parameter name exceeds 255 character. Can we make it tiny url before WCF adapter write to context?

    I am using Request-Response WCF-WebHttp for GET negotiation. Do you have example for receive side variable mapping to deal with optional parameters?

    Regards,

    Upadhyay A. 

    Thursday, September 29, 2016 11:40 AM
  • Hi Ashwin,

    Refer below link....may be it could help

    https://social.msdn.microsoft.com/Forums/en-US/5bcc1d9c-e5f8-415b-81e7-7a0b46194bde/optional-parameters-in-url-subpath-of-wcf-webhttp-adapter-in-receive-location?forum=biztalkgeneral


    Regards,


    Mandar Dharmadhikari

    Thursday, September 29, 2016 2:59 PM
  • The below solution worked for us.

    Url="?/param1={param1}&amp;param2={param2}&amp;param3{param3}"

    Friday, September 30, 2016 3:58 PM
  • Thank Mandar for your reply. There is workaround we found and it worked.

    Regards,

    Upadhyay A

    Friday, September 30, 2016 3:59 PM
  • Hi Ashwin,

    Although its a old post ;however I am looking for your work around that you did to address the limitation of 255 characters in get  params.

    Regards,

    Nilesh 

    Wednesday, November 1, 2017 8:21 AM
  • Hi Nilesh,

    I believe few of the work around helped us.

    1. By shortening the parameter and using below expression

    Url="?/param1={param1}&amp;param2={param2}&amp;param3{param3}"

    2. Using POST instead of GET 

    Thursday, March 1, 2018 12:15 PM