【发布时间】:2014-04-08 13:15:38
【问题描述】:
我正在尝试使用 BizTalk 2013 中的 WCF-SQL 适配器从存储过程返回记录。 我遵循了一个简单的online walkthrough,这似乎让我得到了我需要的东西。 但是,当接收位置运行时,我不断收到转换错误。我的 SP 中没有任何 GUID。我什至将我的 SP 简化为返回硬编码字符串的 SQL 语句。
SELECT [Description] , PackageName FROM ( SELECT 'ABC' [Description] ,'123' as PackageName ) as ResponseTable
Schema 需要两个字符串类型的字段。
请参阅下面的错误。
The receive location "Receive - Package" with URL "mssql://xxx/xxx?InboundId=PackageErrors" is shutting down. Details:"Microsoft.ServiceModel.Channels.Common.AdapterException: Unable to cast object of type 'System.Guid' to type 'System.IConvertible'.. Endpoint Address - mssql://xxx/xxx?InboundId=PackageErrors ---> <b>System.InvalidCastException: Unable to cast object of type 'System.Guid' to type 'System.IConvertible'.</b>
at Microsoft.Adapters.Sql.SqlAdapterInboundHandler.Polling_WaitForMessage(TimeoutHelper timeoutHelper)
at Microsoft.Adapters.Sql.SqlAdapterInboundHandler.WaitForMessage(TimeSpan timeout)
--- End of inner exception stack trace ---
at Microsoft.Adapters.Sql.SqlAdapterInboundHandler.WaitForMessage(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.WaitForMessage(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.WaitForMessage()".
【问题讨论】:
-
您是导入向导生成的绑定文件还是手动创建接收位置?
-
是的,我手动导入了这个绑定文件。
-
发现问题是我的投票语句缺少 COUNT() 部分。所以它实际上是返回错误中提到的 GUID。
标签: biztalk biztalk-2013