ACCESSING WEB SERVICES - Code Units

WAMIKWAMIK Member Posts: 14
edited 2013-02-18 in NAV Three Tier
Hi,

I have added Services in the web services with the system defined code units and new code units.

All the published pages and code units are shown in http://localhost:7047/DynamicsNAV70/WS/ ... ./services

But i am not able to access the Web Services for the system defined code units (1 tp 49999) although it is already published and it is also shown in the services.

Comments

  • prabhupdeshprabhupdesh Member Posts: 49
    are you getting any error?
  • WAMIKWAMIK Member Posts: 14
    Yes i am gettig the following error:

    The website cannot display the page.

    This error (HTTP internal server error) means that the website you are accessing had a server problem which prevented the webpage from displaying.
  • prabhupdeshprabhupdesh Member Posts: 49
    Please check if below resolves your query:
    http://www.mibuso.com/forum/viewtopic.php?t=38284
  • jglathejglathe Member Posts: 639
    Hi,

    to publish a webservice you need to make an entry in the "Web Service" table. This is also true for any codeunit you want to expose as a webservice. I would recommend not to do this with standard CUs, though. It is good practice to have dedicated CUs exposing what you intend to publish as a webservice. This way a change in the standard CU won't bite you.

    with best regards

    Jens
  • mihail_kolevmihail_kolev Member Posts: 379
    almost every standard codeunit has a function which takes a parameter(s) with type Record. If these functions are not local, you will always get error:
    Parameter paramName of the type INavRecordHandle in method Test in service test is invalid!
    

    when try to use this published codeunit.

    Write your methods in separate codeunits.
    -Mihail- [MCTS]
  • WAMIKWAMIK Member Posts: 14
    thanks a lot
Sign In or Register to comment.