【发布时间】:2015-04-29 19:35:18
【问题描述】:
我正在这里练习教程 - Invoking REST Interface using BizTalk Server
在该页面中,步骤 3(e) 指示提供 GET 作为要在属性的出站消息中抑制的动词 - Suppress Body for Verbs。给出的解释对我来说不是很清楚。
作为一个实验,我删除了 GET 动词并删除了一个输入文件。应用程序因以下错误而暂停:
System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type.
Server stack trace:
at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStreamAsyncResult..ctor(HttpWebRequest httpWebRequest, HttpOutput httpOutput, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.BeginGetOutputStream(AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpOutput.SendAsyncResult.SendWithoutChannelBindingToken()
at System.ServiceModel.Channels.HttpOutput.SendAsyncResult.Send()
at System.ServiceModel.Channels.HttpOutput.SendAsyncResult..ctor(HttpOutput httpOutput, HttpResponseMessage httpResponseMessage, Boolean suppressEntityBody, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartSend(Boolean completedSynchronously)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin()
at System.ServiceModel.Channels.ServiceChannel.BeginCall(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, TimeSpan timeout, AsyncCallback callback, Object asyncState)
at System.ServiceModel.Channels.ServiceChannel.BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.BeginRequest(Message message, AsyncCallback callback, Object state)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.Channels.IRequestChannel.BeginRequest(Message message, AsyncCallback callback, Object state)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendRequestMessage(IBaseMessage bizTalkMessage, IRequestChannel channel)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)
MessageId: {9FA7042A-0391-4AAF-946F-FE9C5516ABFD}
InstanceID: {4C29E43D-278A-4615-8A30-4ED1B1CBC2AD}
为什么需要这样做?当我不抑制它时会发生什么?
【问题讨论】:
标签: rest biztalk msdn biztalk-2013