Options

How to update NAV webservices in a .Net solution without altering the enum variables?

My .Net solution uses several NAV webservices. This was deployed on to a server that we shall call LIVE. My client wants a few modifications to be done and hence a separate environment called TEST was created. I've configured the solution to point to the database on my TEST server. However, the webservices in the solution still point to the LIVE. While trying to update the webservices to point to the TEST I'm encountering a problem where the enums in the reference.cs page are getting serialised. While pointing to the LIVE say there are enums DocType, DocType1, DocType2 from different pages that are being consumed as web services... when I change the URL of the web reference to the TEST these are not pointing to the intended enums. I am presuming this happens because of the inclusion of a new webservice that has the variable DocType. How do I stop this from happening? How do I change the webservice to point to my TEST environment?

Answers

  • Options
    RockWithNAVRockWithNAV Member Posts: 1,139
    Hey eskishore93,

    If you have created a separate environment as Test DB then how come it can point to the Live Server as complete NAV Web Service URL will get changed so you need to update the URL as well in your piece of code.

    You will have a new service instance of the Test DB with different Port so I believe you dint changed the Web-service URL this that's why its pointing to Live Server.

  • Options
    eskishore93eskishore93 Member Posts: 2
    Hello RockWithNAV,
    When I try to change the URL in the web services from LIVE to TEST I'm encountering a problem with the variables. What was earlier DocType3 - a variable belonging to the PO page - is now DocType6 for some reason. This I found out when I looked it up in my reference.cs page after pointing it to the TEST. It appears to me that if a new service is added in NAV the enums in the reference.cs page are incremented automatically on clicking the Update Web Reference in the ASP.NET application. Is this the case? Or am I missing something?

    PS In case you need screenshots to better understand this case, please let me know. Thanks in advance.
  • Options
    RockWithNAVRockWithNAV Member Posts: 1,139
    Hey Friend,

    If you have restored the same version of what was running in live then I dont believe you should face these enum issues. There's nothing to be done from NAV side so you can stop anticipating from NAV perspective that changing the URL of web service or specifically the web service from NAV of this Test DB is causing the Issue.(Please check the new Web Service of NAV is running fine)

    Secondly if we discuss from .NET perspective as well then I dont think there's any as in Protocol where in if you change the NAV URL you need to update enums from .NET Side. I am too working on a system which is very highly integrated betwenn .NET(C#) and NAV and we always use to keep on making new environments and the connectivities and we never faced anytime these enum issue.

    I belief there must be something else behind that you need to cross check.
Sign In or Register to comment.