SOAP crashing Nav2009 RTC but not Classic

MauddibMauddib Member Posts: 269
edited 2014-04-11 in NAV Three Tier
I have some code from my Classic System that I am currently testing for our move to RTC. The code begins like this..... I added the MESSAGE comments just for testing.
MESSAGE('A');
CLEAR(reader);
CLEAR(serializer);
CLEAR(connector);

CREATE(connector, TRUE, TRUE);
CREATE(serializer, TRUE, TRUE);
CREATE(reader, TRUE, TRUE);

MESSAGE('B');
connector.Property('EndPointURL', 'http://loadbal/webservices/SyncService');
MESSAGE('C');
connector.Property('SoapAction', 'http://webservices.olution.com/OrderSyncService#getOrder');
MESSAGE('C1');
connector.Connect;
MESSAGE('C2');
serializer.Init(connector.InputStream);
MESSAGE('C3');
connector.BeginMessage;
MESSAGE('C4');

Everything works in Classic, and the rest of the code also runs. I am getting as far as "C2" in RTC however and so I guess the .INIT is crashing my client. At which point the connection to the Server is lost and the client crashes entirely.

Information from the Event Viewer...
Protokollname: Application
Quelle:        MicrosoftDynamicsNAVClient
Datum:         11.04.2014 10:18:20
Ereignis-ID:   0
Aufgabenkategorie:Keine
Ebene:         Fehler
Schlüsselwörter:Klassisch
Benutzer:      Nicht zutreffend
Computer:      114-E20-Gav.mygroup.int
Beschreibung:
Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException
Message: The connection to the server has been lost. The application will close.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoRethrowWithCatchException(Exception exception)
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.Application_ThreadException(Object sender, ThreadExceptionEventArgs e)
     at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
     at System.Windows.Forms.Control.WndProcException(Exception e)
     at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
     at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
     at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
     at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
     at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.Run(ApplicationContext context)
     at Microsoft.Dynamics.Nav.Client.WinClient.RunCore()
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.WinClient.Run()
Source: Microsoft.Dynamics.Nav.Client
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.NavConnectionLostException
Message: The connection to the server has been lost. The application will close.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.<>c__DisplayClass2.<DoRethrowWithCatchException>b__0()
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute)
Source: Microsoft.Dynamics.Nav.Client
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.NavConnectionLostException
Message: The connection to the server has been lost. The application will close.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.HandleCommunicationFailure[T](CallServerMethod`1 callServerMethod, Exception e, Int32 messageNumber, String sessionId)
     at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServiceConnectionBase.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServiceConnection.ActionField(NavRecordState& state, NavDataSet recDataSet, String controlTriggerMethodName)
     at Microsoft.Dynamics.Nav.Client.DataBinder.NstDataAccess.ActionMethod(String triggerName)
     at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeTrigger(LogicalControl logicalControl, UISession uiSession)
     at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.Action.InvokeCoreWithErrorHandling(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.Action.DoInvoke(LogicalControl logicalControl, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.ActionControl.Invoke()
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter, ActionControl actionControl)
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter)
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.OnInvoke()
     at Microsoft.Dynamics.Framework.UI.WinForms.MenuBarActionControlAdapter.<InitializeNativeControl>b__0(Object sender, EventArgs e)
     at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
     at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
     at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
     at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
     at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
     at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
     at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
     at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
     at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
     at System.Windows.Forms.Control.WndProc(Message& m)
     at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
     at System.Windows.Forms.ToolStrip.WndProc(Message& m)
     at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
     at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
     at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
     at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Source: Microsoft.Dynamics.Nav.Client.ServiceConnection
----------------------------------
Type: System.ServiceModel.FaultException
Action: http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault
Message: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
StackTrace:
  
  Server stack trace: 
     bei System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
     bei System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
     bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
     bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
  
  Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
     at Microsoft.Dynamics.Nav.Types.INavService.ActionField(FieldRequest fieldRequest, NavRecordState dataSetState)
     at Microsoft.Dynamics.Nav.Client.ServiceConnection.<>c__DisplayClass47.<ActionField>b__46()
     at Microsoft.Dynamics.Nav.Client.ServerCallContext`1.InvokeCall(Object instance)
     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
     at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
     at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
  
  Exception rethrown at [1]: 
     at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
     at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
     at System.Threading.WaitCallback.EndInvoke(IAsyncResult result)
     at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod)
Source: mscorlib

Ereignis-XML:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MicrosoftDynamicsNAVClient" />
    <EventID Qualifiers="0">0</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-04-11T08:18:20.000000000Z" />
    <EventRecordID>49052</EventRecordID>
    <Channel>Application</Channel>
    <Computer>114-E20-Gav.114group.int</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException
Message: The connection to the server has been lost. The application will close.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoRethrowWithCatchException(Exception exception)
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.Application_ThreadException(Object sender, ThreadExceptionEventArgs e)
     at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
     at System.Windows.Forms.Control.WndProcException(Exception e)
     at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
     at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
     at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
     at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
     at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.Run(ApplicationContext context)
     at Microsoft.Dynamics.Nav.Client.WinClient.RunCore()
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.WinClient.Run()
Source: Microsoft.Dynamics.Nav.Client
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.NavConnectionLostException
Message: The connection to the server has been lost. The application will close.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.<>c__DisplayClass2.<DoRethrowWithCatchException>b__0()
     at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute)
Source: Microsoft.Dynamics.Nav.Client
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.NavConnectionLostException
Message: The connection to the server has been lost. The application will close.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.HandleCommunicationFailure[T](CallServerMethod`1 callServerMethod, Exception e, Int32 messageNumber, String sessionId)
     at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServiceConnectionBase.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServiceConnection.ActionField(NavRecordState& state, NavDataSet recDataSet, String controlTriggerMethodName)
     at Microsoft.Dynamics.Nav.Client.DataBinder.NstDataAccess.ActionMethod(String triggerName)
     at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeTrigger(LogicalControl logicalControl, UISession uiSession)
     at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.Action.InvokeCoreWithErrorHandling(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.Action.DoInvoke(LogicalControl logicalControl, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.ActionControl.Invoke()
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter, ActionControl actionControl)
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter)
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.OnInvoke()
     at Microsoft.Dynamics.Framework.UI.WinForms.MenuBarActionControlAdapter.<InitializeNativeControl>b__0(Object sender, EventArgs e)
     at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
     at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
     at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
     at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
     at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
     at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
     at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
     at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
     at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
     at System.Windows.Forms.Control.WndProc(Message& m)
     at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
     at System.Windows.Forms.ToolStrip.WndProc(Message& m)
     at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
     at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
     at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
     at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Source: Microsoft.Dynamics.Nav.Client.ServiceConnection
----------------------------------
Type: System.ServiceModel.FaultException
Action: http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault
Message: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
StackTrace:
  
  Server stack trace: 
     bei System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
     bei System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
     bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
     bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
  
  Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
     at Microsoft.Dynamics.Nav.Types.INavService.ActionField(FieldRequest fieldRequest, NavRecordState dataSetState)
     at Microsoft.Dynamics.Nav.Client.ServiceConnection.<>c__DisplayClass47.<ActionField>b__46()
     at Microsoft.Dynamics.Nav.Client.ServerCallContext`1.InvokeCall(Object instance)
     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
     at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
     at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
  
  Exception rethrown at [1]: 
     at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
     at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
     at System.Threading.WaitCallback.EndInvoke(IAsyncResult result)
     at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod)
     at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod)
Source: mscorlib
</Data>
  </EventData>
</Event>

Any input appreciated.

Comments

  • geordiegeordie Member Posts: 655
    I don't think it's possible to create automation with OnClient = True when publishing an object as web service.
  • MauddibMauddib Member Posts: 269
    Not 100% I understand you.... I am not publishing any object in Navision as a webservice. I am using a Navision codeunit to call the SOAP library to call a webservice that is entirely external to Navision.

    Sorry maybe I am misunderstanding your post?
  • geordiegeordie Member Posts: 655
    Sorry I misunderstood the outline of the situation: I personally never handled such as case :oops:
    Is the library (and so the Init function) custom made?
  • MauddibMauddib Member Posts: 269
    Nope, the Soap libraries are standard Soap 3.0 Toolkit DLLs.
  • geordiegeordie Member Posts: 655
    Mauddib wrote:
    Nope, the Soap libraries are standard Soap 3.0 Toolkit DLLs.

    Instead of using it, since it is actually outdated, could be suitable for you to use xmlhttp, like in this example?
Sign In or Register to comment.