# XML response from Service Connect workflow could not be deserialized **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2017-01-18 17:00 UTC **Views:** 2205 **Replies:** 9 **URL:** https://www.epiusers.help/t/xml-response-from-service-connect-workflow-could-not-be-deserialized/36938 --- ## Post #1 by @bmgarver Any Service Connect gurus out there that can take a look at this error I'm getting and point me in the right direction? The workflow is called from a Method Directive BPM and successfully updates the Sales Order as expected and finishes with a status of Complete and with no indication of any errors. However, the below error is displayed on the client that initiated the call once the workflow is finished. Business Layer Exception XML response from Service Connect workflow could not be deserialized Exception caught in: Epicor.ServiceModel Error Detail ============ Description: XML response from Service Connect workflow could not be deserialized Program: Erp.Bpm.BO.SalesOrder.Update.dll Method: A002_InvokeWorkflowAction Server Trace Stack: at Epicor.Customization.Bpm.BO837F05A694774906B12EA6C782B66AD6.UpdatePostProcessingDirective_PricingSC_ED8C8873C39B3F97E311C7AE09932416.A002_InvokeWorkflowAction() at Epicor.Customization.Bpm.BO837F05A694774906B12EA6C782B66AD6.UpdatePostProcessingDirective_PricingSC_ED8C8873C39B3F97E311C7AE09932416.ExecuteCore() at Epicor.Customization.Bpm.DirectiveBase`3.Execute(TParam parameters) in c:\_Releases\ICE\3.1.500\Current\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 160 at Epicor.Customization.Bpm.MethodCustomizationBase2`3.<>c__DisplayClass20_0.b__5(MethodDirectiveBase`3 dir) in c:\_Releases\ICE\3.1.500\Current\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 232 at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate) at Epicor.Customization.Bpm.MethodCustomizationBase2`3.RunDirectives(TParam parameters) in c:\_Releases\ICE\3.1.500\Current\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 236 at Epicor.Customization.Bpm.CustomizationBase2`3.Execute(TParam parameters) in c:\_Releases\ICE\3.1.500\Current\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 77 at Epicor.Customization.Bpm.BO837F05A694774906B12EA6C782B66AD6.SalesOrderSvcCustomization.Update(SalesOrderTableset& ds) at Erp.Services.BO.SalesOrderSvcFacade.Update(SalesOrderTableset& ds) in C:\_Releases\ERP\UD10.1.500.9\Source\Server\Services\BO\SalesOrder\SalesOrderSvcFacade.cs:line 3465 at Erp.Services.BO.SalesOrderSvc.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, SalesOrderTableset& ds) in C:\_Releases\ERP\UD10.1.500.9\Source\Server\Services\BO\SalesOrder\SalesOrder.cs:line 20966 at Erp.Services.BO.SalesOrderSvcFacade.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, SalesOrderTableset& ds) in C:\_Releases\ERP\UD10.1.500.9\Source\Server\Services\BO\SalesOrder\SalesOrderSvcFacade.cs:line 2378 at SyncInvokeMasterUpdate(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\3.1.500.9\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59 at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\3.1.500.9\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28 at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:\_Releases\ICE\3.1.500.9\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state) at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest) at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state) at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e) at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags) at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) Client Stack Trace ================== at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Erp.Proxy.BO.SalesOrderImpl.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, SalesOrderDataSet ds) at Erp.Adapters.SalesOrderAdapter.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel) at Erp.UI.App.SalesOrderEntry.Transaction.Update() Inner Exception =============== Element 'UpdateResponse' with namespace name 'http://www.epicor.com/bpm/BO/ERP/SalesOrder/Response' was not found. Line 3, position 34. --- ## Post #2 by @Aaron_Moreng I ran into this once. When was the last time you recycled IIS on your application server? We fixed by re-importing references and recycling IIS. --- ## Post #3 by @bmgarver Thanks for the suggestion Aaron. I re-imported the .Net References and recycled the IIS. Still same result. --- ## Post #4 by @Aaron_Moreng In your BPM Schemas folder in SC, do you have both a request and a response schema for Sales Order? --- ## Post #5 by @bmgarver That is correct. The initial workflow uses those Schemas for the start and finish nodes. I use a sub-workflow to cycle through the OrderDtl rows and make changes with the SalesOrder.UpdateExt method. --- ## Post #6 by @Aaron_Moreng Was this workflow working before and then stopped working? The BPM Call Service Connect Workflow node will automatically (if I remember correctly) create the Request and Response schema's for that method. Service connect, however, will utilize the UpdateExt method request and response schemas instead of the Update ones. In your workflow, you must specify the UpdateExt method and appropriate schema's from your reference. --- ## Post #7 by @bmgarver This same workflow is working in E9.05.702A. We are in the process of upgrading to E10.1.500.9. It is a bit of a complex workflow in that there are (4) sub-workflows that could be called to update the OrderDtl and OrderMsc tables in the current Sales Order. Could it be related to the schema that is assigned to the Finish node in each of the sub-workflows? Should this be set to the BPM Response schema, the UpdateExt Response schema or something totally different? --- ## Post #8 by @Aaron_Moreng I believe that the finish node of your top level workflow must be the Response schema from the BPM. The sub workflow should utilize the UpdateExt request/response to do the actual update while the finish node of the sub workflow will be the input schema for your final conversion to BPM Response schema in your top level workflow. --- ## Post #9 by @bmgarver Aaron, Thanks for your help. I had to add a final Conversion in the top level workflow that was not required in E9 Service Connect. Would have never thought of that without your suggestions. Thanks again. --- ## Post #10 by @Aaron_Moreng Glad to help! --- **Canonical:** https://www.epiusers.help/t/xml-response-from-service-connect-workflow-could-not-be-deserialized/36938 **Original content:** https://www.epiusers.help/t/xml-response-from-service-connect-workflow-could-not-be-deserialized/36938