Hi!
Disclaimer: This is not about offering a Webservice with NAV to some 3rd Party program. I want to do the exact opposite.
I'm looking for a way to connect to an external Webservice to transmit some data to it when the Navision user does a certain task. Like Updating attributes of an Item-Record. Or Posting a purchase order.
I guess this will lead me to write a .NET component but i was wondering if there are alternatives and if there is some kind of "best practise model" around already.
Thanks for your help in advance!
Edit: I figured it might help to elaborate a little more: We built a module able to exchange data with a Webshop via SOAP-interface. But so far it was always the Webshop sending requests to us. With the Webshop already having included Enduser friendly E-Mail-Template management and many more features, we now want to be able to push new events on the Navision side to the Webshop in realtime. At the moment we have a Timer on the Webshops side to ask for updates regularly. But we want more flexibility.
0
Comments
These links will get you started:
Connect Navision with external web service
Connecting to NAV Web Services from Microsoft Dynamics NAV 2009 SP1
This creates cleaner code and you can often use C# commands that are harder to do in NAV.
Downside: you end up having business logic in C#.
Personally I believe Microsoft should make it easier to consume webservices in nav. Programming xmlhttp directly is quite a hassle.
Just my 2 cents.
I could help you with a bare bones working example without any error handling. However, it makes a difference how you will authenticate. For example, if you call another NAV installation, you will set the username and password in xmlhttp. But if you would call a Magento API, you need to set an ApiKey as a parameter and deal with session timeouts. So the actual implementation depends on the 3rd party app.
Unfortunately The realisation of this got down prioritized so I'll have to do other stuff for the next few months. Thanks for the help anyway. I hope i'll remember this thread when i'm back on the topic. :?
What is the dotnet equivalent of the XmlHttp?
So far I have found a hint, but nothing I can use.
http://mibuso.com/blogs/davidmachanick/