I have IE 8 installed and have not had any issues with my webservice.
I would delete the record webservice table and try to publish it again. Make sure it's in correct CASE.
Ahmed Rashed Amini
Independent Consultant/Developer
We are on NAV 2009 SP1 with classic client. We do not have the 3-tier env so we do not have the NAV server installed or web service running. We need to schedule jobs in different companies and we are looking at the options. I looked at Rashed's other option of having 2 NAS licenses but somehow I couldn't get that working(also the license is expensive) and then I saw this thread and I tried this in a playground and everything worked as outlined in the document so I am leaning towards this solution
So what do we need to implement this solution in our production env? Here is what I am thinking
1. Install NAV server thereby get access to web services
2. Import the codeunit and publish it as a web service
3. Setup job queue entries to run the codeunit for jobs in other companies
I was testing with my developer license so that's probably why it worked. So to move the changes to production I guess we would need the licenses you mentioned. Do you have any idea how much it costs?
Another question in relation to this. As I said earlier we do not have a service tier right now so we would have to setup that for the job queue to work. We are in a citrix env with a number of terminal servers where the classic client is installed and a sql server so any recommendation on where to install the application server and the NAV server?
Thanks Rashed. Now regarding the windows account to run the NAS & web service, does it really need sysadmin rights on the SQL and SUPER role in Navision?
no, it can be regular windows user with rights to run as service.
You'll need to look at delegation to allow 3 tier environment. MSDN has some walk through. As fas as NAV security, it needs to have permission to run what you schedule it to do. .
Ahmed Rashed Amini
Independent Consultant/Developer
Thanks again. I was trying to to schedule a report using web service & job queue and I am getting the following message.
'Report state information cannot be transferred to Microsoft Dynamics NAV Classic client report from the RoleTailored client. One or more of the public functions on report 50374 has been called before running the report.'
The report I am calling through your codeunit calls a series of reports in turn to do different things and each of them run through every company in our database to pull the information using changecompany and report 50374 is the first sub report it's calling. The main report calls a function in report 50374 to set some parameters before running the report, is that the problem? None of these reports has any RDLC definition attached to it, they are all pure classic reports.
If they are processing only reports, it is fine, if they are printing information, then you need to create the RDLC. The webservice cannot call classic client to print a report.
Ahmed Rashed Amini
Independent Consultant/Developer
Alright, so I added the RDLC and now I am getting the error 'Callback functions are not allowed.'
While reading more about the error message I found out it could be due to the dialog functions that I am using in the report. But didn't you say in the beginning that one of the advantages of using web service is you don't have to change your programs to remove such code and the web service is going to ignore them?
Are you openning a form on opencompany trigger in CU 1? or anywhere else during the process?
Do you have CONFIRM somewhere in your code or Message?
also are you running your report to print something? if you are printing something, you need to call SAVEASPDF or excel instead of actually running the report.
Ahmed Rashed Amini
Independent Consultant/Developer
I made the report Processonly and that took care of the issue. SAVEASPDF is an RTC function as far as I know so I don't think that will work for us, actually these reports are really process only but it had sections to print some information and that is why I created some RTC layout thinking it will work based on your earlier recommendation. Thanks for all the help.
Rashed, I am testing this in a new env where I have the database & NAV server in one server and the client on the other. The services are running and when I tried to run a simple report I am getting the unhandled error and when I checked the response.xml file it is empty. Do you know what could be the issue? Thanks
I am not on R2 and my login has admin privilege on the NAV server box and SUPER role in NAV. The program stops at the else part of the code in the codeunit
IF NOT ISCLEAR(XmlNode) THEN BEGIN
IF XmlNode.text <> Text_Finished THEN
ERROR(XmlNode.text)
ELSE
MESSAGE(XmlNode.text); END ELSE BEGIN
XmlDoc.save('C:\response.xml');
HYPERLINK('C:\response.xml');
ERROR(Text50002);
END;
The only thing I am seeing in the event log at the server is an http 401 unauthorized information type message for the source NAS. But the account that is assigned to NAS has admin level rights on Windows & sql server and SUPER role in NAV.
If I schedule a job just using NAS it works fine but it doesn't work if I use the codeunit to schedule a job using web service.
The issue is resolved by changing the server name in the config file and in the codeunit to localhost(makes sense because the database & the NAV server are on the same box) but still wondering why calling with the name cause issue. I could see the published web services by calling with the name of the server in a browser.
Our job queue log entries shows “This message is for C/AL programmers:
The call to member send failed. msxml3.dll returned the following message:
The connection with the server was terminated abnormally”
We’ve tried running several different codeunits and get the same error
It seems to be the solution that I need for this requirement that I have. I followed all the steps as explained and I was able to check the list of web services in a web browser. However when running the Job Queue I am encountering errors. I duplicated the codeunit in order to debug it and executed the codeunit.
Here are the errors that I encountered.
Are there any other setup required that is not mentioned in the blog? ThankS!
Comments
I would delete the record webservice table and try to publish it again. Make sure it's in correct CASE.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have tried already to delete and add the webservice record again.
It is a strange issue. I will try again later.
We are on NAV 2009 SP1 with classic client. We do not have the 3-tier env so we do not have the NAV server installed or web service running. We need to schedule jobs in different companies and we are looking at the options. I looked at Rashed's other option of having 2 NAS licenses but somehow I couldn't get that working(also the license is expensive) and then I saw this thread and I tried this in a playground and everything worked as outlined in the document so I am leaning towards this solution
So what do we need to implement this solution in our production env? Here is what I am thinking
1. Install NAV server thereby get access to web services
2. Import the codeunit and publish it as a web service
3. Setup job queue entries to run the codeunit for jobs in other companies
Do we need to purchase any additional license?
Thanks for the help
Otherwise, you'll need one service tier license. and one light user license.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Another question in relation to this. As I said earlier we do not have a service tier right now so we would have to setup that for the job queue to work. We are in a citrix env with a number of terminal servers where the classic client is installed and a sql server so any recommendation on where to install the application server and the NAV server?
I suggest to install the NAS and Service tier on one new separate box.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
You'll need to look at delegation to allow 3 tier environment. MSDN has some walk through. As fas as NAV security, it needs to have permission to run what you schedule it to do. .
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
'Report state information cannot be transferred to Microsoft Dynamics NAV Classic client report from the RoleTailored client. One or more of the public functions on report 50374 has been called before running the report.'
The report I am calling through your codeunit calls a series of reports in turn to do different things and each of them run through every company in our database to pull the information using changecompany and report 50374 is the first sub report it's calling. The main report calls a function in report 50374 to set some parameters before running the report, is that the problem? None of these reports has any RDLC definition attached to it, they are all pure classic reports.
Any idea?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
While reading more about the error message I found out it could be due to the dialog functions that I am using in the report. But didn't you say in the beginning that one of the advantages of using web service is you don't have to change your programs to remove such code and the web service is going to ignore them?
IF GUIALLOWED THEN
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have added IF GUIALLOWED THEN to all of the dialog calls but I am still getting the same error. Any other reason for that error message?
Are you openning a form on opencompany trigger in CU 1? or anywhere else during the process?
Do you have CONFIRM somewhere in your code or Message?
also are you running your report to print something? if you are printing something, you need to call SAVEASPDF or excel instead of actually running the report.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
There was a blog also on how to monitor the wcf webservice for NAV.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
If I schedule a job just using NAS it works fine but it doesn't work if I use the codeunit to schedule a job using web service.
Here is the link again.
http://blogs.msdn.com/b/nav/archive/201 ... am+Blog%29
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
is this compatible with NAV 2009 R2?
Our job queue log entries shows “This message is for C/AL programmers:
The call to member send failed. msxml3.dll returned the following message:
The connection with the server was terminated abnormally”
We’ve tried running several different codeunits and get the same error
Cheers
Red
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RunJob.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It seems to be the solution that I need for this requirement that I have. I followed all the steps as explained and I was able to check the list of web services in a web browser. However when running the Job Queue I am encountering errors. I duplicated the codeunit in order to debug it and executed the codeunit.
Here are the errors that I encountered.
Are there any other setup required that is not mentioned in the blog? ThankS!