Reputation: 229
I'm working with a RESTful API within BizTalk. I need to make a POST against the following endpoint:
http://mycompany.sb01.com/atwork/api/v5.0
I've tested my API Url via Postman with the following(Which works):
http://mycompany.sb01.com/atwork/api/v5.0/UID?name=bob&id=028153
I'm having trouble converting this into a send port in my BizTalk application due to having multiple URL parameters in my POST. When I have the below binding in the BizTalk Admin Console I get a System.ArgumentException which tells me that '=' is an unexpected token and that the expected token is ';'.
<BtsHttpUrlMapping>
<Operation Name="ID Insert" Method="POST" Url= "/UID?name={name}&id={id}"/>
</BtsHttpUrlMapping>
But it only ever works with 1 URL parameter, not multiple ones. If I remove:
&id={id}
from my binding, it goes through without any exceptions. How does BizTalk handle multiple URL parameters?
Upvotes: 1
Views: 1987
Reputation: 21
You need to escape ampersand sign(&) to &
Url in Operation tag should look like this
Url= "/UID?name={name}&id={id}"
Upvotes: 0
Reputation: 11527
You have to escape &
in the querystring to &
So it is
<BtsHttpUrlMapping>
<Operation Name="ID Insert" Method="POST" Url= "/UID?name={name}&id={id}"/>
</BtsHttpUrlMapping>
Upvotes: 6