<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLMetadataFailedException</faultcode> <faultstring xml:lang="en-GB">Metadata for object of type CodeUnit with id 50000 is in a failed state. This is caused by a previous exception: Could not find a part of the path 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit50000.cs'.</faultstring> - <detail> <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Metadata for object of type CodeUnit with id 50000 is in a failed state. This is caused by a previous exception: Could not find a part of the path 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit50000.cs'.</string>
Comments
As far passing strings longer than 1024, yes you can use bigtext as parameter and pass it by reference (VAR).
Webservice will return the parameter back to the caller.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Test Lead
Microsoft Dynamics NAV
This posting is provided "AS IS" with no warranties, and confers no rights.
Now, I've restarted both services a couple of times, using the normal "Restart" menu item, but what happened now that I stopped both fully. And then I just started the NAV Service but not the Business WebService. And it created these directories.
Although I never seen a .cs file in them, even though I modified and recompiled the codeunit, it started to work. Interesting.
My guess is that the MicrosoftDynamicsNavServer subdirectory and all those under it in ProgramData are deleted at some point and a simple restart of the server service does not recreate it, perhaps because the business webservice service is running too. Stopping both and starting the nav service recreates it. Strange.
I can't pass that XMLPort on to another function as yet another VAR Parameter to construct it in that function, it has to be constructed in the original one, because it says assignment is not allowed.
That's not very handy when there are 50 little functions in the web service that I intendeded to write as one-liners, calling one general function with different parameters... :-/
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Hand-writing all the XML's?... Oh... wait, I think I know what you mean. Function 1 is exposed to the web service with a ByRef XMLPort. It calls Function 2 giving a BigText ByRef parameter. Function 2 calls Function 3 giving in the same BigText the same way. Function 3 instantiates an XMLPort, streams it into the BigText, and it goes all the way back to Function 1 which streams the BigText back into the XMLPort. OK, I think that can be done. I think I should try it and blog it