Well, I’ve been tasked with giving end users the ability to see and modify reports that come out of our Navision Attain system over the Internet. Me having a lot of J2EE knowledge, would like to use Java to integrate with Navision. [:)] Me being a total newbie to Navision, has no clue on how this can be done! [:(] Now, we use a SQL Server database to drive Navision, and I can get to that using JDBC, but there are going to be those times when I will need to ask Navision for the information directly. I guess I can use JNI to make calls to Navsion to generate the information, and then store the results out in the database. In short, is there any documentation or a tutorial available telling me how to communicate with Navision through Java? Heck, I’ll even take some doucmentation telling me how to communicate with Navision using VB or C++ or …well you name it! I just need something that shows a higher level language communicating with Navision Attain to request and submit data. Thanks!
Boy this sure is a popular topic! What I have been able to dig up so far is that there are a couple options: 1) Somehow integrate with the E-Commerce Gateway Solution component for Navision (expensive). 2) Communicate with the Navision Application Server directly. 3) Use the Navision Commerce Portal component. I like option 2 if there is an easy way to get data back and forth and make calls to execute C/AL objects outside of NAvision to receive changes and generate reports. So, where are the examples of Java, or C++, etc. applications communicating with Navision? Surely with all of the installations in the world someone has integrated their web front ends with Navision. Thanks
Hi Darrin, that there are no answers to your topic have you seen. So nobody in this forum uses the technic you want to use. There are several reasons for it :
- 1.) Navision isn’t only a poor SQL-Frontend[:D]
- 2.) in local installations there is no need for your technic
- 3.) in internetinstallation with direct work usally Citrix or Terminalserver is used [;)]
- 4.) In internetinstallation for slaves like POS there are a lot of ‘ready to work’ solutions like GoPro / Lansteiner[;)]
and so on… I dicussed these theme a week or so before and the solution was : Talk to the customer and learn a lot of navision and then solve the problem within navision.[:)][:D] In most cases there is even no need to use VB or so.[;)] p.s.: POS = Point Of Sale
Many thanks. [:)] Not what I wanted to hear ( [B)] ), but I appreciate the response. Surely though, there should be someone who has done this sort of thing. I would have very little problem generating reports (get data via JDBC) but submiting data back into Navision is what I am most concerned about. If there is a way from the command line to execute a Navision object and have that object accept data remotely or even read srom a file or table, then I’m still in business. Anyone know how this could be done (kick off a Navision object from the command line)? Thanks!
quote:
but submiting data back into Navision is what I am most concerned about
That is the problem without knowing internal structure of data in some cases such problems can be solved by dataports to a posting table
quote:
If there is a way from the command line to execute a Navision object
No Way
quote:
and have that object accept data remotely or even read srom a file or table, then I’m still in business.
Perhaps there is a solution with Applicationserver and dataports
Darrin, you might want to check out this thread: http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=3783&SearchTerms=command,line,object It’s a bit old, but might still be useful to you. After all, it means that your last question can be answered with “Yes” [:D]
Thanks again! [:)] I’ll check out that link. BTW, reading the Microsoft Business Solutions “AutoMation and Connectivity: The Role Of Microsoft Business Soltions Navision Application Server”, it says that: “Navision Application Server was created because there was a need for an application or component that could execute C/AL objects of any kind except from forms and dataports, in a stable enviroment.” So this SOUNDS like it was designed with what I have in mind to be able to do.
Hi Heinz, i’m in doubt if i understood the old task correct : There was no really solution, or ? The expandit-tool wasn’t really doing what was wished to do, or ?
I think I found a way for them to communicate…very high level details so far, but it seems from what I have read that this may work. [^] Navision’s Integration Component (AIC) can communicate with BizTalk correct? Well, I think that BizTalk has a “Utilities Adapter” that can work with JMS (Java Messaging). Does this ring a bell with anyone? [?]
quote:
Originally posted by h-d.neuenfeldt
i’m in doubt if i understood the old task correct : There was no really solution, or ? The expandit-tool wasn’t really doing what was wished to do, or ?
Hi Hans-Dieter, If “real solution” means “Navision-only”, then you are right, there was none. Judging from the old thread I mentioned, the ExpandIT tool seemed to work as it was supposed to do, but was not really appreciated due to possible interference with users working directly on the server. If - as should be the usual case in a client-server environment - working directly on the server’s console is the exception rather than the rule, this should not pose a significant problem… Besides, the thread is more than one year old. I’m sure there is a better version available by now [:D]
quote:
Originally posted by h-d.neuenfeldt
quote:
but submiting data back into Navision is what I am most concerned about
That is the problem without knowing internal structure of data in some cases such problems can be solved by dataports to a posting table
Could you point me to where I might find an example of using “dataports to a posting table” or exaplin how it should be done, or show me where in the documentation it is explained in detail? [:)] Thanks.
Darrin : I think that I remember seeing something about importing into journals or ledgers in the Application Developers Guide for 3.10 or 2.6. Will you be importing into a journal then auto posting or directly into the ledger (I’ve never had the liscense to allow.) It pretty straight forward (most C/AL is) but I have some hurried examples somewhere if you need. Best Rgds. Owen
The thing is, I’m not sure how I need to do it. All I want to do is have a generic way to: 1) Get the data from reports out of Navision in a format (XML for example) that I can use to display over the Internet 2) Submit data back to Navision (an order for example) so that it goes through the proper accounting (in other words, I don’t just want to stuff it in a table and have it cause problems with G/L for example). Oh, and I want to be able to do this without spending the $65,000 ([B)])or so it will take to buy a two processor license for BizTalk and the license for the Navision Commerce Gateway. Surely there is an inexpensive way to get Navision to accept data without going through the Commerce Gateway (just too expensive).
Darrin: How time sensitive is the information? I suppose that orders will need to be automatic and in real-time without any user intervention, except possibly QA? Are these reports scheduled or browser activated? All reports can automatically be converted to HTML by Navision. You would not need to buy the entire gateway to accomplish. The only real piece you should need is the Application Server. Its only a fraction of the cost of the commerce gateway or biz talk server. You would need then to design your own schemas and codeunits (doc. handlers) to accomplish the real-time piece. Here is some advice I recieved from a fellow developer here in the forum. My intention was to use MSMQ, XML, and the NAS (app server). I hope that Edward doesn’t mind me quoting him here. “What you need is: 1 x NAS (Navision Application Server) MSMQ at both ends (Windows comes with MSMQ free) About 3 or 4 codeunits to form the base of your MSMQ structure. This does not add up to much cost at all. At the requesting end (I think in your case it is java?), you would need to be able to access MSMQ and to be able to create and receive messages. You can use ComCom for this or you can use Microsoft’s MSMQ objects, it shouldn’t make much difference.Note that if you do use MSMQ objects, you have to set the message label to something like ‘MQBA-NAVISION’ otherwise Navision will not read it. Search on the forums for msmq and you should find the correct string to set. At the Navision end, you would need to modify codeunit 1 trigger 99 and create another parameter for the case statement that will run your own MSMQ despatcher system. (eg. we could call the trigger ‘MSMQ’). ‘MSMQ’: BEGIN CODEUNIT.RUN(CODEUNIT::“MSMQ Dispatcher”); ATASStarted := TRUE; END; When you run NAS, set the startup parameter to whatever was in the previous paragraph (‘MSMQ’) and it should start running your MSMQ despatcher. Your despatcher should look similar to codeunit “99008528 BizTalk Appln. Srv. Startup”. This is a slightly more robust version of the example used in the dev. guide. From there, it is just a question of parsing messages into xml and handling them in your own way. Over here, Ive had to design a simple format for incoming and outgoing messages so I can handle them all the same. eg. getstatement report 10000 This is just an example xml file I made up to give you an idea of what Im on about. The DOM parser should read a message like that ok and I should be able to pick out things such as report name by using the xpath ‘/navquery/header/name’. To make things simple, I would just create a big case statement based on the value of ‘/navquery/header/name’ and this would send the message to different codeunits or reports to do the actual legwork.” Owen
quote:
Originally posted by mcoAggie
Darrin: How time sensitive is the information? I suppose that orders will need to be automatic and in real-time without any user intervention, except possibly QA? Are these reports scheduled or browser activated? All reports can automatically be converted to HTML by Navision.
I need the reports to be run on request
quote:
You would not need to buy the entire gateway to accomplish. The only real piece you should need is the Application Server. Its only a fraction of the cost of the commerce gateway or biz talk server. You would need then to design your own schemas and codeunits (doc. handlers) to accomplish the real-time piece.
Sounds good as we already have the Application Server.
quote:
Here is some advice I recieved from a fellow developer here in the forum. My intention was to use MSMQ, XML, and the NAS (app server). I hope that Edward doesn’t mind me quoting him here. “What you need is: 1 x NAS (Navision Application Server) MSMQ at both ends (Windows comes with MSMQ free) About 3 or 4 codeunits to form the base of your MSMQ structure. This does not add up to much cost at all. At the requesting end (I think in your case it is java?), you would need to be able to access MSMQ and to be able to create and receive messages. You can use ComCom for this or you can use Microsoft’s MSMQ objects, it shouldn’t make much difference.Note that if you do use MSMQ objects, you have to set the message label to something like ‘MQBA-NAVISION’ otherwise Navision will not read it. Search on the forums for msmq and you should find the correct string to set. At the Navision end, you would need to modify codeunit 1 trigger 99 and create another parameter for the case statement that will run your own MSMQ despatcher system. (eg. we could call the trigger ‘MSMQ’). ‘MSMQ’: BEGIN CODEUNIT.RUN(CODEUNIT::“MSMQ Dispatcher”); ATASStarted := TRUE; END; When you run NAS, set the startup parameter to whatever was in the previous paragraph (‘MSMQ’) and it should start running your MSMQ despatcher. Your despatcher should look similar to codeunit “99008528 BizTalk Appln. Srv. Startup”. This is a slightly more robust version of the example used in the dev. guide. From there, it is just a question of parsing messages into xml and handling them in your own way. Over here, Ive had to design a simple format for incoming and outgoing messages so I can handle them all the same. eg. getstatement report 10000 This is just an example xml file I made up to give you an idea of what Im on about. The DOM parser should read a message like that ok and I should be able to pick out things such as report name by using the xpath ‘/navquery/header/name’. To make things simple, I would just create a big case statement based on the value of ‘/navquery/header/name’ and this would send the message to different codeunits or reports to do the actual legwork.” Owen
Thanks! I’ll run this by our Navision rep (so far he has been suggesting the Commerge Gateway or Commerce Portal from Navision). What you mention seems like a way to do things a LOT less expensive. Darrin
Quick question: Have you looked at a JMS to MSMQ adapter? MSMQ does not talk to JMS (everything else does MQ wise…but not Microsoft’s MQ [:(!]). So far the only JMS to MSMQ bridge I have found sells for $10,000! [:0] Thanks.
[xx(] Ouch! No, I had not had the opportunity to figure out how to get the two connected. I saw your other post and as far as I know Navision doesn’t offer (at this time) any com interfaces. [:(]
Our Navision rep seems to agree (no COM interface). [:(] What I could do though is use jCom (from WebLogic) to talk to the MSMQ, or use the Fiorano MQ bridge to communicte from JMS to MSMQ. I think the latter is about $4,500 or so (some “suite” solutions to get the two to talk were as high as $50,000). My rep also suggested that we may want to go the simple table post route using JDBC. In that, we would post to a Navision table that Navision was polling and would then read up the changes, and write out the results to a table that we could then read. Sad way to do it, but free! I’ll keep the group posted as to our decision. Surely others will want to do this sort of thing. HINT TO NAVISION: Give your product access via Java in some form or fashion without having to jump through all of these hoops.
Darrin, We use the Navision Application Server to modify data in Navision, call codeunits, and call reports from Delphi via messaging. The Microsoft Communication Components facilitate all our communication between client and server. The Delphi app is not aware of Navision, and Navision is not aware of the Delphi app, so I don’t see why using Java would pose any more difficulty. Waynewil
There is a SocketBusAdapter as well. (See CommunicationComponent Documentation for this, I think it came with version 3.6 - but 3.7 would be better, since SocketBusAdapter was still buggy in 3.6) So communication via sockets is possible. Though handling is a bit tricky. From Java perspektive you got to kill the connection after (or at least create a new connection for) every new request. This is due to Navision not noticing new requests on an existing connection (from outside Navision :)). That’s why no MessageReceivedEvent will be created and hence it can’t be processed. XML processing is what I would recommend as well. Have also a look on RecordRefs and FieldRefs, which give you at least some generic access on tables and their fields (from 3.6, same comment as for SicketBusAdapter). Hope this helps. Sven Dietze (comporsys.de)