Web service parameter null

daansdaans Member Posts: 21
edited 2011-09-08 in NAV Three Tier
Hi,

I'm currently developing an application using a Dynamics Nav webservices. I've exposed a codeunit as a web service and when I call this web service on my local machine everything works fine.

I was asked to install my application on a demo computer. To do so, I was given a sample database. I transferred the necessary codeunits, forms and pages using FOB-files in Dynamics.

When I run the C# application on the demo computer, I receive the following exception:

"System.Web.Services.Protocols.SoapException: Parameter pbolOnlyNewModified in method GetMessagesForUserWithRemarks in service .... is null"

The exception indicates a faulty parameter is being passed. pbolOnlyNewModified is the first parameter I pass to the GetMessagesForUserWithRemarks-method. Here's the code I'm using:
            wsTest.Agent svc = new wsTest.Agent();
            svc.Url = Properties.Settings.Default.wsUrl;
            svc.UseDefaultCredentials = true;

            DateTime lastSync = DateTime.MinValue;
            string sMessages = "";
            svc.GetMessagesForUserWithRemarks(false, true, lastSync.ToUniversalTime(), ref sMessages);
I'm a bit confused as where the exception is coming from: I'm explicitly passing "false" as the parameter's value...

Does anyone know what I'm doing wrong?
Sign In or Register to comment.