使用API​​ POST:REST webservices:body序列化

New*_*y23 9 rest wcf biztalk

我正在尝试使用REST网络服务,请遵循以下指示:http://social.technet.microsoft.com/wiki/contents/articles/invoke-restful-web-services-with-biztalk-server-2010.aspx

但是,GET似乎工作正常,但POST失败了,因为不知何故,消息被序列化为字符串.

我明白了:

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/">&lt;body xmlns="http://microsoft.com/schemas/samples/biztalkwebhttp/1.0"&gt;HelloWorld&lt;/body&gt;</string>
Run Code Online (Sandbox Code Playgroud)

代替:

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>
Run Code Online (Sandbox Code Playgroud)

这有一条消息:12005ab0-1522-71e1-0dde-0a0801c50000 application/xml; charset = utf-8 HelloWorld

端口配置如文章中所示.

关于我看到这种行为的可能原因的任何指示?

谢谢

Llo*_*ore 0

原因是content-type