Web service DemoCU - UsingLettersService

LouisLouis Member Posts: 78
edited 2009-01-02 in NAV Three Tier
I try the WS sample of NAV2009 in the Virtual machine using its Visual Studio 2008 version

There is a compilation issue
Could someone help me with this problem

The C# line where the issue occurs :
DemoCU ws = new DemoCU();

Error message in VStudio
The Type or namespace name "DemoCU" could not be fround ( are you missing a using directive or an assembly reference ?

What is missing in VS2008 ?


  • Options
    LouisLouis Member Posts: 78
    "DemoCU could not be found"

    I can see DemoCU_Port + DemoCU_PortChannel + DemoCU_PortClient
    but not the DemoCU class. It is not visible in VStudio. What is missing (directive, assembly, "whatelse" ) ?

    My question is
    HOWTO => Create a new instance of the service.

    In IE, I have checked the published service name
    contractRef ref="http://nav-srv-01:7047/DynamicsNAV/WS/CRONUS_International_Ltd/Codeunit/DemoCU"
    It's ok.
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    It sounds like the reference added is a Service reference instead of a web reference.
    When you add the service you can select Advanced (I think) and add a Web reference instead.

    The programming needed to use the webservice is different based on service or web reference.

    (note - I haven't seen the sample mentioned...)
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV

    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.
  • Options
    LouisLouis Member Posts: 78
    Thank you Freddy that was my problem - now it works.
    FYI The sample is located in NAV2009 Developer Help - Creating and Consuming a Codeunit Web Service
Sign In or Register to comment.