Odata doesn't working

ro03ro03 Member Posts: 22
edited 2013-11-07 in NAV Three Tier
Hi Guys,

When i try to open the Odata web service in IE i get this:

The server encountered an error processing the request. See server logs for more details.

I get this message in windows logbook when i try to open the ODATA web service


Server instance: NAV2013ITWTest
Session type: UnknownClient
Session ID: N/A
User: ROCWBLOCAL\ros
Type: System.NotSupportedException
Message: Published web services contain a duplicate service name: Company. Service names must be unique to be supported by OData.
StackTrace:
at Microsoft.Dynamics.Nav.Service.ODataServiceProvider.ODataMetadata.AddResourceType(ResourceType resourceType)
at Microsoft.Dynamics.Nav.Service.ODataServiceProvider.ODataMetadataProvider.AddCompanyServiceMetadata()
at Microsoft.Dynamics.Nav.Service.ODataServiceProvider.ODataMetadataProvider.CreateResourceTypesForPublishedServices(NavConnection connection)
at Microsoft.Dynamics.Nav.Service.ODataServiceProvider.NavServiceHelper.<>c__DisplayClass1.<ExecuteOperation>b__0(NavConnection connection)
at Microsoft.Dynamics.Nav.Service.ODataServiceProvider.NavServiceHelper.ExecuteOperation[TResult,T1,T2](String companyName, ODataOperation`3 operation, T1 parameter1, T2 parameter2)
Source: Microsoft.Dynamics.Nav.Service.ODataServiceProvider
HResult: -2146233067

Do i need to do more for i can use this? Or do i need an developer license?

I hope you can help me!

Thx

Answers

  • ara3nara3n Member Posts: 9,256
    Check the webservice table and make sure each name you typed for each record is unique.

    The error is pretty clear.
    Published web services contain a duplicate service name: Company. Service names must be unique to be supported by OData.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ro03ro03 Member Posts: 22
    ara3n wrote:
    Check the webservice table and make sure each name you typed for each record is unique.

    The error is pretty clear.
    Published web services contain a duplicate service name: Company. Service names must be unique to be supported by OData.

    Hi,

    I have this in the Table:

    See image.
  • ara3nara3n Member Posts: 9,256
    Use process of elimination.

    Rename Query19 to something else. For Example: MyQ.

    If it doesn't work. Remove one record at a time.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ro03ro03 Member Posts: 22
    ara3n wrote:
    Use process of elimination.

    Rename Query19 to something else. For Example: MyQ.

    If it doesn't work. Remove one record at a time.

    Hi.

    I renamed the services with numbers it works now.

    Thx!
  • ara3nara3n Member Posts: 9,256
    Great. Change the topic to fixed
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kos_paukos_pau Member Posts: 4
    When you start the OData service, NAV automatically adds the Companies list to the OData publications.
    You can check it by retrieving the list of OData publications:
    http://localhost:7048/DynamicsNAV70/OData

    So, if you will add the Company to the Web Service table by yourself (with service name Company), it will dublicate the automatically added service. And that is what was the error message about.
Sign In or Register to comment.