Exception handling 无法捕获biztalk业务流程中的wcf服务异常

Exception handling 无法捕获biztalk业务流程中的wcf服务异常,exception-handling,biztalk,Exception Handling,Biztalk,我试图将异常处理放入我的工作编排中,但无法捕获异常。它一直挂起消息,而不是执行我的异常块来更优雅地处理它 有什么建议吗 以下是我收到的事件日志消息: A message sent to adapter "WCF-Custom" on send port "InsertOracleMasterPort" with URI "oracledb://svd0odbd01:1529/ebsdev/Dedicated" is suspended. Error details: Microsoft.Se

我试图将异常处理放入我的工作编排中,但无法捕获异常。它一直挂起消息,而不是执行我的异常块来更优雅地处理它

有什么建议吗

以下是我收到的事件日志消息:

A message sent to adapter "WCF-Custom" on send port "InsertOracleMasterPort" with URI "oracledb://svd0odbd01:1529/ebsdev/Dedicated" is suspended. 
 Error details: Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-1017: invalid username/password; logon denied ---> Oracle.DataAccess.Client.OracleException: ORA-1017: invalid username/password; logon denied
   at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
   at Oracle.DataAccess.Client.OracleConnection.Open()
   at Microsoft.Adapters.OracleCommon.OracleCommonConnectionWrapper..ctor(String connectionString, OracleCommonExecutionHelper executionHelper)
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   --- End of inner exception stack trace ---

Server stack trace: 
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
   at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()

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.ICommunicationObject.Open()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage) 
 MessageId:  {1CC95FB3-E543-4011-9BDD-EABB50B75BC2}
 InstanceID: {EF352982-D16C-421E-806C-58E432049951}
第二条信息:

xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Orchestrations.OracleInvoice(868ee765-7874-ec30-0cc7-f81ae5ebfb2b)'.
The service instance will remain suspended until administratively resumed or terminated. 
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 7eefaf7e-0e9c-4ee6-be6e-7030ece2058b
Shape name: 
ShapeId: 
Exception thrown from: segment -1, progress -1
Inner exception: An error occurred while processing the message, refer to the details section for more information 
Message ID: {1CC95FB3-E543-4011-9BDD-EABB50B75BC2}
Instance ID: {EF352982-D16C-421E-806C-58E432049951}
Error Description: Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-1017: invalid username/password; logon denied ---> Oracle.DataAccess.Client.OracleException: ORA-1017: invalid username/password; logon denied
   at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
   at Oracle.DataAccess.Client.OracleConnection.Open()
   at Microsoft.Adapters.OracleCommon.OracleCommonConnectionWrapper..ctor(String connectionString, OracleCommonExecutionHelper executionHelper)
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   --- End of inner exception stack trace ---

Server stack trace: 
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
   at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()

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.ICommunicationObject.Open()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)


Exception type: XlangSoapException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context)
The following is a stack trace that identifies the location where the exception occured

   at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
   at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
   at Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
   at Orchestrations.OracleInvoice.segment2(StopConditions stopOn)
   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
以下是编排:

catch块使用以下类型的错误对象:

  • System.Web.Services.Protocols.SoapException
  • Microsoft.XLANGs.Core.XlangSoapException
  • Microsoft.XLANGs.BaseTypes.XLANGsException
  • 一般例外
  • 系统异常

我原以为异常处理会冒泡,并在系统中被捕获。异常或一般处理程序,但这不会发生。

基于这些帖子,您似乎需要创建并捕获wcf故障验证


基于这些帖子,您似乎需要创建并捕获wcf故障验证


不幸的是,这两个例子都是由知识渊博的人写的,没有经验不足的人需要的解释。文本“created a fault operation”(创建了一个故障操作)是指在端口定义中右键单击该操作,然后创建一条“New fault Message”(新故障消息)。它不是创建一个将处理该故障的新操作。除非单击端口定义中的操作,否则创建故障消息的选项不可见。很不幸,这两个例子都是由知识渊博的人写的,没有经验不足的人需要的解释。文本“created a fault operation”(创建了一个故障操作)是指在端口定义中右键单击该操作,然后创建一条“New fault Message”(新故障消息)。它不是创建一个将处理该故障的新操作。除非单击端口定义中的操作,否则创建故障消息的选项不可见。没有任何视觉线索表明这种情况存在。