Web services Metadata is in failed state

cjdcjd Member Posts: 2
edited 2010-07-21 in NAV Three Tier
Morning

I've been plodding along with the 2009 WebServices without any (major) glitches. Until I added a new function to an already existing Codeunit.

I now cannot access the webservice at all and keep getti the following error:

<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 XmlPort with id 76194 is in a failed state. This is caused by a previous exception: Compilation of assembly 'C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly\XMLport76194.dll' failed. This can be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date. Error details: c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\XMLport\XMLport76194.cs(137,11) : error CS1501: No overload for method 'RegisterSourceExpression' takes '5' arguments c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\XMLport\XMLport76194.cs(138,11) : error CS1501: No overload for method 'RegisterSourceExpression' takes '5' arguments c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\XMLport\XMLport76194.cs(139,11) : error CS1501: No overload for method 'RegisterSourceExpression' takes '5' arguments</faultstring>
- <detail>

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Metadata for object of type XmlPort with id 76194 is in a failed state. This is caused by a previous exception: Compilation of assembly 'C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly\XMLport76194.dll' failed. This can be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date. Error details: c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\XMLport\XMLport76194.cs(137,11) : error CS1501: No overload for method 'RegisterSourceExpression' takes '5' arguments c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\XMLport\XMLport76194.cs(138,11) : error CS1501: No overload for method 'RegisterSourceExpression' takes '5' arguments c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\XMLport\XMLport76194.cs(139,11) : error CS1501: No overload for method 'RegisterSourceExpression' takes '5' arguments</string>

I have tried recompiling the object, recreating the object, recreating with a new id - all fail. At the moment we have hidden the function to allow testing of the other developments.

Any body seen this and got any solutions?

Cheers

Chris

Comments

  • ChielChiel Member Posts: 32
    I had same problem.
    Recompiling the codeunits and xmlports resolved the problem.
    Propably you upgraded from Dynamics NAV 2009 to Dynamics NAV 2009 SP1.
  • swapnil1985swapnil1985 Member Posts: 12
    Is there any difference between NAV 2009 and NAV 2009 SP1 regarding WebServices.

    As i am getting the similar error. When i try to read data of customer through customerlist page object (WebServices through .NET).

    In my case Codeunit 99008528 BizTalk Appln. Srv. Startup creates the problem. As i fire ReadMultiple method of customerlist page webservice once it stops the NAV Service and Business Web Service and in event log history shows the similar error.

    Hi Cjd, Was your problem solved. Please give me some guidance on this.
  • ChielChiel Member Posts: 32
    Recompiling all object will propably fix your problem.
  • clayfoxclayfox Member Posts: 23
    One Change with SP1 is how the company name is rendered in the URL.

    So spaces in company names went from underscores to the more common %20

    That was a lot of updating.

    I am updating output journals mostly and the permissions for this also changed, now needing Responsibility Center access.
  • jwilderjwilder Member Posts: 263
    I had the exact same error/problem. I recompiled the codeunits/xmlports related to the web service calls and all works now. Thanks!

    This happened when I upgraded from NAV 2009 to NAV 2009 SPI. I did get a SQL error when I upgrade so I think that was the problem. I am going to recreate the error and figure out why I got it as that must be the source of this problem
  • kinekine Member Posts: 12,562
    If you change executables from NAV 2009 to NAV 2009 SP1, you MUST recompile all object. There are changes in the created assemblies and they are not compatible...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • djswimdjswim Member Posts: 277
    I'm sorry if this is a stupid question, but I've never EVER developed in anything but regular C/SIDE in my life (used Visual Studio for the first time today in 14 years of working with the product).

    I'm getting this same error regarding table 37 (although it's saying "Record 37" in a lot of places). I recompiled table 37 and restarted the role tailored client (which, coincidentally is the only place I get it, classic works fine) but it has not gone away. By the previous replies, it seems like there is something else I need to do, but I'm not sure what... one of the answers sounds like I need to recompile EVERY object in the DB, but that doesn't seem like the answer since I can get into other stuff.

    Is there something else I need to stop/restart? Log out of the VPC I'm working in? Please help, I'm the red-headed stepchild of NAV 2009 right now.
    "OMG ALL MY DATA IS GONE"
    "Show All..."
    "Oh..."
Sign In or Register to comment.