Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BizTalk 2013 - 256 Character limit on URL when exposing REST endpoint via WCF-WebHttp

I am currently working on a requirement to provide routing for a large mapping request, which can have up to 30 querystring items.

On developing my BizTalk project, I have been successful in accepting a http request with a small number of querystrings using the WCF-WebHttp type, promoting the properties and sending the message to the appropriate system via a subscribing send port.

However, if the number of querystrings increases to the point where the URL address exceeds 256 characters, I get the following error:

The value of a promoted property cannot exceed 256 characters. Property "To" Namespace "http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF-properties". Parameter name: obj

This is thrown before the receive pipeline. I understand that promoted properties cannot exceed 256 characters, however in this instance I am stuck as I (seemingly) have no control over the property promotion regarding the above property.

Is it possible to configure the BizTalk application not to promote the "To" property? I guess that it is promoted for a reason, so it may not be a feasible solution to do this - if it can be done at all.

With that in mind, is there any other way of creating a receive location that can handle requests with a large amount of querystrings? I had a look at the WCF-Custom, but I couldn't see anything obvious.

like image 720
Carl Avatar asked Feb 06 '17 17:02

Carl


1 Answers

Most likely you are using GET method to expose the service. You should look at using POST method when you have lots of parameters. You can send a json/xml message in Body with all details to a small url. In case you decide to use json, you can use JSON pipeline component to convert the json to XML and then do your routing as required.

like image 115
Vikas Bhardwaj Avatar answered Oct 29 '22 23:10

Vikas Bhardwaj