我创建了一个简单的编排来调用 WCF 服务并从中获取响应。Web服务方法很简单:
字符串 GetSimple(int 值)
BizTalk 监视文件夹并使用 FILE 适配器从那里接收激活消息,然后构造适当的消息并调用 Web 服务。但因此异常而失败:
错误描述:System.Configuration.ConfigurationErrorsException:找不到类 System Diagnostics.TextWriterTraceListener 的类型。 服务器堆栈跟踪: 在 System.Diagnostics.TraceUtils.GetRuntimeObject(字符串类名,类型 baseType,字符串初始化数据) 在 System.Diagnostics.TypedElement.BaseGetRuntimeObject() 在 System.Diagnostics.ListenerElement.GetRuntimeObject() 在 System.Diagnostics.ListenerElement.GetRuntimeObject() 在 System.Diagnostics.ListenerElementsCollection.GetRuntimeObject() 在 System.Diagnostics.TraceSource.Initialize() 在 System.Net.Logging.InitializeLogging() 在 System.Net.Logging.get_On() 在 System.Net.WebRequest.Create(Uri requestUri,布尔值 useUriBase) 在 System.Net.WebRequest.Create(Uri requestUri) 在 System.ServiceModel.Channels.HttpChannelFactory.GetWebRequest(EndpointAddress 到,Uri 通过,NetworkCredential 凭据,TokenImpersonationLevel impersonationLevel,AuthenticationLevel authenticationLevel,SecurityTokenProviderContainer proxyTokenProvider,SecurityTokenContainer clientCertificateToken,TimeSpan 超时) 在 System.ServiceModel.Channels.HttpChannelFactory.GetWebRequest(端点地址,Uri 通过,SecurityTokenProviderContainer tokenProvider,SecurityTokenProviderContainer proxyTokenProvider,SecurityTokenContainer clientCertificateToken,TimeSpan 超时) 在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.GetWebRequest(端点地址,Uri 通过,SecurityTokenContainer clientCertificateToken,TimeoutHelper 和 timeoutHelper) 在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.GetWebRequest(端点地址,Uri 通过,TimeoutHelper 和 timeoutHelper) 在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.BeginSendRequest(消息消息,TimeSpan 超时) 在 System.ServiceModel.Channels.RequestChannel.BeginRequest(消息消息,TimeSpan 超时,AsyncCallback 回调,对象状态) 在 System.ServiceModel.Dispatcher.RequestChannelBinder.BeginRequest(消息消息,TimeSpan 超时,AsyncCallback 回调,对象状态) 在 System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartSend(布尔完成同步) 在 System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin() 在 System.ServiceModel.Channels.ServiceChannel.BeginCall(字符串操作,布尔单向,ProxyOperationRuntime 操作,Object[] ins,TimeSpan 超时,AsyncCallback 回调,对象 asyncState) 在 System.ServiceModel.Channels.ServiceChannel.BeginRequest(消息消息,TimeSpan 超时,AsyncCallback 回调,对象状态) 在 System.ServiceModel.Channels.ServiceChannel.BeginRequest(消息消息,AsyncCallback 回调,对象状态) 在 [0] 处重新抛出异常: 在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) 在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 类型) 在 System.ServiceModel.Channels.IRequestChannel.BeginRequest(消息消息,AsyncCallback 回调,对象状态) 在 Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendRequestMessage(IBaseMessage bizTalkMessage,IRequestChannel 频道) 在 Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage) 异常类型:XlangSoapException 来源:Microsoft.XLANGs.BizTalk.Engine 目标站点:Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context) 以下是标识异常发生位置的堆栈跟踪 在 Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(信封 env,Int32 operationId,上下文 ctx) 在 Microsoft.XLANGs.Core.Subscription.Receive(Segment s、上下文 ctx、Envelope& env、Boolean topOnly) 在 Microsoft.XLANGs.Core.PortBase.GetMessageId(订阅订阅、Segment currentSegment、Context cxt、Envelope& env、CachedObject 位置) 在 Orch.Orc.segment1(停止条件 stopOn) 在 Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s、StopConditions stopCond、Exception& exp)
我找不到TextWriterTraceListener
。它在哪里?如何摆脱这个异常?