将翻译后的 4010 xml 提交到旧版 Web 服务后收到错误
下午好。
我正在向州(密歇根州)发送 270 并接收 271,然后将其转换为 271 的 4010 版本,以便遗留 Web 服务可以尝试吸收数据。 Web 服务使用 dbml 和 LINQ 将消息转换为一系列表示数据库的类,在转换发生后,它会执行事务并更新客户端。但是我收到一条错误消息:
适配器无法传输消息到发送端口“SendEDI” 网址为“http://biz05/WriteEligibilityResponse/service.svc”。它会 在为此发送指定的重试间隔后重传 港口。详细信息:“System.ServiceModel.FaultException:a:InternalServiceFault尝试删除之间的关系 X12_NM1 和 X12_271_2120C。然而,其中的关系之一 外键(X12_271_2120C.X12_NM1_Id)不能设置为 null.尝试是 用于删除 X12_NM1 和 X12_271_2120C 之间的关系。 然而,关系的外键之一 (X12_271_2120C.X12_NM1_Id) 不能设置为 无效的。在 EligibilityLookup.Service.ResponseToSQL.WriteResponse(Message 消息)
在 SyncInvokeWriteResponse(Object , Object[] , Object[] )
在 System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(对象 实例,Object[] 输入,Object[]&输出)
在 System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& 远程过程调用)
在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& 远程过程调用)
在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& 远程过程调用)
在 System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)System.InvalidOperationException
在 Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult 结果)”。
请记住,我无法更改 LINQ 代码(我无法将客户端作为管理决策的一部分进行编辑,重建前端是项目的第 2 阶段)是否有任何建议的方法可以解决此问题?我有已经删除了地图中该元素的 5010 到 4010 链接,而且我也不关心是否将完整的 271 数据集放入遗留系统中。
Good Afternoon.
I am sending a 270 to the state(Michigan) and receiving a 271 which I then transform into a 4010 version of the 271 so that a legacy webservice can attempt to absorb the data. The webservice is using dbml and LINQ to translate the message into a series of classes that represent the database after translation occurs it performs a transaction and updates the client. However I am getting an error that says:
The adapter failed to transmit message going to send port "SendEDI"
with URL "http://biz05/WriteEligibilityResponse/service.svc". It will
be retransmitted after the retry interval specified for this Send
Port. Details:"System.ServiceModel.FaultException: a:InternalServiceFaultAn attempt was made to remove a relationship between
a X12_NM1 and a X12_271_2120C. However, one of the relationship's
foreign keys (X12_271_2120C.X12_NM1_Id) cannot be set to
null.An attempt was
made to remove a relationship between a X12_NM1 and a X12_271_2120C.
However, one of the relationship's foreign keys
(X12_271_2120C.X12_NM1_Id) cannot be set to
null. at
EligibilityLookup.Service.ResponseToSQL.WriteResponse(Message message)at SyncInvokeWriteResponse(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object
instance, Object[] inputs, Object[]& outputs)at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&
rpc)at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&
rpc)at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&
rpc)at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)System.InvalidOperationExceptionat
Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult
result)".
Keeping in mind that I cannot change the LINQ code(I cannot edit the client as part of a management descion, rebuilding the front end is Stage 2 of the project) is there any suggestable way to get around this? I have already removed the 5010 to 4010 link in the map for this element, and I also do not care if the I get a complete 271 dataset into the legacy system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是谷歌搜索错误就出现了这个:
http://blogs.msdn.com/b/bethmassi/archive/2007/10/02/linq-to-sql-and-one-to-many-relationships.aspx
如果您无法更改 linq 模型,那么您似乎必须将数据映射到发送到 Web 服务的 4010 文档中,以便将数据填充到映射的 X12_NM1 中到 X12_271_2120C 表。
Just googling the error came up with this:
http://blogs.msdn.com/b/bethmassi/archive/2007/10/02/linq-to-sql-and-one-to-many-relationships.aspx
If you can't change the linq model then it appears you are going to have to map data into the 4010 document you send to the web service so that data is populated in the X12_NM1 that maps to the X12_271_2120C table.