I am trying to use an REST webservice, by following the indications here: http://social.technet.microsoft.com/wiki/contents/articles/invoke-restful-web-services-with-biztalk-server-2010.aspx
However, the GET's seem to work correctly, but the POST are failing because, somehow, the message is getting serialized as a string.
I get:
POST /my_app/12005ab0-1522-71e1-0dde-0a0801c50000 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: bsmshell.inovaprime.com:81
Content-Length: 174
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"><body xmlns="http://microsoft.com/schemas/samples/biztalkwebhttp/1.0">HelloWorld</body></string>
Instead of:
POST /my_app/12005ab0-1522-71e1-0dde-0a0801c50000 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: bsmshell.inovaprime.com:81
Content-Length: 174
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<body xmlns="http://microsoft.com/schemas/samples/biztalkwebhttp/1.0">HelloWorld</body>
This with a message like: 12005ab0-1522-71e1-0dde-0a0801c50000 application/xml; charset=utf-8 HelloWorld
The ports configurations are as indicated in the article.
Any pointers on the possible reason why I am seeing this behaviour?
Thanks
Message.CreateMessage(request.Version, request.Headers.Action, bodyElement.ToString()); Changing it to: Message.CreateMessage(request.Version, request.Headers.Action, bodyElement); solved the problem.
[ Posting in-order for others to find out]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With