Question

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.InvalidOperationException

at 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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top