Parameter xxx in method xxx in service xxx is null

sarria88sarria88 Member Posts: 2
edited 2011-01-24 in NAV Three Tier
Dear all:

I have a problem while instaling my c# aplication on my clients testing server.

I have developed and application that calls some functions of a published codeunit via Web services on Navision 6sp1.

I have developed the system at my office and the code is working fine in our servers. My office system is a Windows Server 2003 with a SQL server 2005 for the database.

The code is as simple as follows:

string tresterminos;
wsCodeunit = new CodeunitNav.CodeunitNav();
wsCodeunit.Credentials = new NetworkCredential(NombreAccWSNAV(), PasswordAccWSNAS(), DominiccWSNAS());

Tresterminos = wsCodeunit.TestHola();

Tresterminos = wsCodeunit.DevolverTerminosDePago(Sesiones.IdTipoPedido,importe);


While i run the code at my office everything works fine.

Now i am installing the system on a testing machine. This machine is a windows XP Profesional with a SQL server 2008. Both have the same code, and the same codeunits.

No , when testing the aplication on the XP machine, i get an error while calling the DevolverTerminosDePago function that says:

Parameter TipoPedido in method DevolverTerminosDePago in service is null . I get the same error in any call that has parameters.

Any idea why i get this message?

Thanks in advance.

Miguel

Comments

  • kinekine Member Posts: 12,562
    Which .NET framework have you installed? Are you using same NAV versions on both configurations?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • MrWhoMrWho Member Posts: 59
    We are experiencing the same thing.

    We made a modification to the codeunit exposed as a web service from Nav, then we had this null error. In the Visual Studio dev project we forced and update of the web service reference and it worked fine after that for the installation we discovered it on.

    But now we made some changes to the codeunit again, and updated our fourth installation with the same codeunit and it seems like nothing we do can force this null parameter to go away. Our setup is:
    On the same SQL Server:
    Country 1 - LIVE DATABASE
    Country 1 - TEST DATABASE
    Country 2 - LIVE DATABASE
    Country 2 - TEST DATABASE

    On another server we are running 4 database middle thier services and 4 web service services connected to these different databases. They are all setup the same way, and the interface codeunit has the same exposed name, blob size ,date and time on each installation. And when calling it on Country 2 - LIVE Database we experience this null error but not on any of the others. We have tried restarting all the services, and the third party consuming the web service say they really have updated the reference and done a total redeploy.

    Error Log:
    Service: 
    User: 
    Type: Microsoft.Dynamics.Nav.Service.WebServices.ServiceBrokerException
    Message: Parameter partnerCode in method BookTransaction in service CPSNavIntegration is null! 
    StackTrace:
         at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitXmlAdapter.BuildStackFrame(MethodInfo method, XmlElement input)
         at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitXmlAdapter.<>c__DisplayClass4.<Dispatch>b__0()
         at Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
         at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitXmlAdapter.Dispatch(XmlElement input, XmlWWriter output)
         at Microsoft.Dynamics.Nav.Service.WebServices.SoapHandler.<>c__DisplayClass4.<Microsoft.Dynamics.Nav.Service.WebServices.IXmlRequestHandler.Dispatch>b__0()
         at Microsoft.Dynamics.Nav.Service.WebServices.SoapHandler.<>c__DisplayClass9.<BuildEnvelop>b__8()
         at Microsoft.Dynamics.Nav.Service.WebServices.XmlWWriter.Element(String name, XmlCallback elementHandler)
         at Microsoft.Dynamics.Nav.Service.WebServices.SoapHandler.<>c__DisplayClass9.<BuildEnvelop>b__7()
         at Microsoft.Dynamics.Nav.Service.WebServices.XmlWWriter.Element(String name, XmlCallback elementHandler)
         at Microsoft.Dynamics.Nav.Service.WebServices.SoapHandler.<>c__DisplayClass9.<BuildEnvelop>b__6()
         at Microsoft.Dynamics.Nav.Service.WebServices.XmlWWriter.SetNamespace(QNamespace namespace, XmlCallback nodeHandler)
         at Microsoft.Dynamics.Nav.Service.WebServices.SoapHandler.BuildEnvelop(XmlWWriter output, ContentHandler handler)
         at Microsoft.Dynamics.Nav.Service.WebServices.SoapHandler.Microsoft.Dynamics.Nav.Service.WebServices.IXmlRequestHandler.Dispatch(XmlElement input, XmlWWriter output)
         at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.DispatchSoap(UrlParser relivantURLPart, XmlReader input, TextWriter output)
         at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, String serviceName, Uri url, XmlReader input, TextWriter output, String sid)
         at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass3.<>c__DisplayClass5.<ProcessMessage>b__1()
         at Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
         at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass3.<ProcessMessage>b__0(StreamWriter streamWriter)
         at Microsoft.Dynamics.Nav.Service.WebServices.WCFUtil.GetPopulatedMemoryStream(StreamFillingCallback callback)
         at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(Message message)
         at SyncInvokeProcessMessage(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.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
         at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
         at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
         at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    Source: Microsoft.Dynamics.Nav.Service.WebServices
    

    Someone knows what can cause this? It isn't the codeunit since it is the same on every other Nav installation I mentioned.

    This installations is with Dynamics Nav 6.0 SP1 only. It is of course country specific for country 1 and for country 2.
  • kinekine Member Posts: 12,562
    And the calling application is same on all? It looks like the calling app is not setting the parameter...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • MrWhoMrWho Member Posts: 59
    [-o<

    We compiled the codeunit. It solved the problem.

    I can't remember compiling the object in one of the test enviroment after importing FOB, but that was it.

    Is this because of the "2000000071 Object Metadata" table beeing updated when compiling and not when importing FOB?
Sign In or Register to comment.