using MS Messege queue in linux environment

IBSIBS Member Posts: 29
Hello Client has their website running on linux using php.

They want to integrate with NAV. Sending orders etc.

I am suggesting using MSMQUEue and using NAV Comcom dll files.

I was wondering if linux system can send xml files to MSMQ. If yes, could you provide me with some code and any packages that needs to be installed. Thank you.

Comments

  • WaldoWaldo Member Posts: 3,412
    hm, difficult one. I'm not a linux-maniak, not in the least. But purely theoretical...

    Isn't it possible to "talk" through webservices? One webservice (NAV side) sends XML to MSMQ and NAS picks it up. Other webservice (linux side) gets XML from NAV.

    capiche?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • kinekine Member Posts: 12,562
    I think that you cannot use the MSMQ directly form Linux, but you can use some bridge like described in "http://msdn.microsoft.com/en-us/library/ms947353.aspx".

    Or you can do some research on MSMQ over HTTP (http://blogs.msdn.com/ihimmar/archive/2 ... 71996.aspx)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • IBSIBS Member Posts: 29
    edited 2008-08-20
    I did some research over msmq and no luck. I don't think it's possible. :(

    Is there an example using xmlttp to access msmq over http?

    I would greatly appreciate it.


    My other option is to create webservice on NAS. So what are the options to create a webservice in NAS?
  • DenSterDenSter Member Posts: 8,305
    Google "MSMQ from Linux", second hit: Click here
  • IBSIBS Member Posts: 29
    well the code on linux is written in PHP so it limits my options. Also the link for your link points page not found.
  • SavatageSavatage Member Posts: 7,142
    Also the link for your link points page not found

    Just fill in a screen name. It brings you to a post on the msdn forum
    http://forums.microsoft.com/MSDN/ShowPo ... 5&SiteID=1

    which then has a link to:
    http://msdn.microsoft.com/en-us/library/ms947353.aspx
  • DenSterDenSter Member Posts: 8,305
    Strange, for me that link opens a discussion on an msdn forum, and the link in the reply section brings up the reference article right away.

    My point wasn't so much that I found THE answer for you (that would be arrogant :mrgreen:), but that by googling "MSMQ from Linux" it returned:
    Results 1 - 10 of about 84,100 for MSMQ from Linux
    Surely you can find an answer in there somewhere. Doing stuff like this you will have to get used to spending at least half your time figuring out how to do things, and following a large number of links. You find a piece of the puzzle in every link you follow, and you put them together to apply your own solution.
  • IBSIBS Member Posts: 29
    I spent 4 hours today doing the research and didn't find any info on a php on linux being able to connect to MSMQ.

    I'm sure there are lot of companies that integrate NAV with a website running on linux (PHP) like mibuso.
    What method do you use for two way integration?
  • DenSterDenSter Member Posts: 8,305
    I have not worked with Linux ever, so I don't know how to accomplish that, I would have to search for it myself. What we've done for automation type questions is to find a C# code sample, and see if we could make that work with C/AL automation objects. The same I guess would apply for PHP programming, but I have no idea how that works. Since it's an open source language though, I suspect there are literally millions of articles about various topics. I would try and find some PHP boards and post your question in there.

    Don't complain about just a mere 4 hours though, that's nothing. I've searched literally weeks for solutions because there was no training budget. The customer would not pay for me to go to training for 1 week, but there was no problem billing them for weeks of R&D, go figure :).

    I don't know what else to say but 'keep it up', the answer must be out there :mrgreen:. Another thing I would do is go grab myself a coffee at the local Borders or B&N or whatever bookstore is near you, and see if I can find any PHP books that have messaging examples in them. There are tons of PHP books out there, so surely one of them has a hint in it.
  • jlandeenjlandeen Member Posts: 524
    If tightly integrating with Navision has been a problem because you haven't been able to find a design that works so far there are a few different architectures I see that could work (and I've used both of these in the past on various integration projects).

    1 - Web Service Based: Build a front end web service that runs on IIS & communicates to MSMQ. Then using some of the various tecniques that have been discussed on various message boards & whitepapers available from Microsoft hook up Navision to MSMQ via a NAS. Then you can access the message and use it however you would like within a Navision codeunit (run a dataport, XML Port, another codeunit or whatever) to handle order processing or creation. This gives you a fairly real time capabilities to integrate Navision with any other system (Linux or otherwise that can communicate via web services. If you don't have any of those pieces my company does offer these components packaged up in a framework for you to use.

    2 - Direct Table Access: This is an approach that I've used in the past several times, it's simple, cheap to develop but not as clean and it doesn't offer real time functionality (and it requires you use SQL). Have your external system perform any reads directly from the Navision tables (READS ONLY). If you need to write anything back to Navision have the data put in a table that is made up of simple text fields. Have a NAS running that monitors records placed in this table and if it finds any it can then create a new order within Navision using standard Navision logic. The important thing here is that these designated "staging" tables are the only tables that an external system writes too. Navision is very picky about it's data types and so it's easy to corrupt things if you start trying to write records in standard Navision tables all on your own. See the URL below for an article on how to compile, build & link a PHP program to SQL server.

    http://www.devarticles.com/c/a/PHP/Executing-Microsoft-SQL-Server-Stored-Procedure-from-PHP-on-Linux/

    Good luck.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • vytjakvytjak Member Posts: 36
    Another way of integrating with a Linux machine would be to use Navision Socket Bus adapter. That would surely be cross-platform, but maybe a bit "hardcore" solution.

    We had a project where a web application on Unix/PHP/Oracle was interacting with NAS via sockets - the setup worked fine.
    Vytenis Jakas
    B3 Technologies - Making Technology Serve the People
  • jlandeenjlandeen Member Posts: 524
    I agree that the socket bus adapter is a little more hardcore. I would still suggest that you couple that socket bus adapter with some sort of web service type wrapper. With more & more .Net and other applications supporting web service standards I think it makes things a little more reusable & easier to integrate with going forward.

    Also if you build a web service based integration the overall solution will be ready if the client switches to NAV2009 in the future (as that has web service integration out of the box)
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.