我正在尝试使用 BizTalk 2013 中的 WCF-SQL 适配器从存储过程返回记录。我遵循了一个简单的在线演练,似乎得到了我需要的东西。但是,当接收位置运行时,我不断收到转换错误。我的 SP 中没有任何 GUID。我什至将我的 SP 简化为返回硬编码字符串的 SQL 语句。
SELECT [Description] , PackageName FROM ( SELECT 'ABC' [Description] ,'123' as PackageName ) 作为 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()".