Navision running as a webservice (without MSMQ)

ehsehs Member Posts: 34
JohnP has provided this detailed description on how to make Navision contact a webservice using xmlports and HTTP POST communication:

http://www.mibuso.com/forum/viewtopic.p ... 375#116375

Can anyone help me with an example on how to make Navision work the other way around - as a webservice receiving request (xml documents) from HTTP and sending back xml answers ?

I have done a lot of integration with MSMQ communication but this time I need some code that can send/receive xml to/from Navision using HTTP (preferably with the NAV communication components which is also used in John's example).

Comments

  • kinekine Member Posts: 12,562
    NAV communication components supports the Sockets. You can use them to communicate with the server through TCP/IP. In this case, it is very similar to MSMQ just you will use another class and address. But I am not sure, if it will be poosible to use it through HTTP protocol...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ehsehs Member Posts: 34
    Thanks Kine,

    TCP/IP Socket is ok, but can you give me an example of C/Side code which makes a single instance codeunit continuously waiting for xml documents sent to a TCP/IP port on the NAS server and the replies with another xml document ?
  • garakgarak Member Posts: 3,263
    Take a look intio Codeunit 7700.
    Regards
    Do you make it right, it works too!
  • ehsehs Member Posts: 34
    Garak, I did that (this advice was also mentioned in John's hint), but I find it difficult to transform this to a simple "receive and send xml via TCP/IP" codeunit.
    If anyone can set up an example of the code needed to do the job so that the codeunit is waiting for request all the time and replies with a new xml document I would be very grateful.
  • kinekine Member Posts: 12,562
    If you already have same thing for MSMQ, you just replace the MSMQ component with Socket component and for the rest you can look into Communication components help file (c:\Program Files\Common Files\Microsoft Dynamics NAV\Communication Component\devguide.chm). There are examples how to receive and send something through Sockets...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.