Webservices in Dynamics NAV 2009

hsilveira
Member Posts: 23
Hi,
I'm implementing a new project where i have to receive orders from a portal. Until today when i have to receive xml files from other applications i use MS-QUEUE and NAS and no problem with that. Now, with NAV 2009 we have Web services functionality and i'm trying to populate one codeunit as webservice but i don't know how to receive that xml message. That xml message will have header and lines. Any ideas that can help me?
Thanks in advance
Hugo
I'm implementing a new project where i have to receive orders from a portal. Until today when i have to receive xml files from other applications i use MS-QUEUE and NAS and no problem with that. Now, with NAV 2009 we have Web services functionality and i'm trying to populate one codeunit as webservice but i don't know how to receive that xml message. That xml message will have header and lines. Any ideas that can help me?
Thanks in advance
Hugo
XMAN
0
Comments
-
Depending on the version of NAV 2009 that you are runinng (2009, SP1, or R2) you have different options.
The cleanest one that I find easy to work with is to use bigtext as the input parameter of a codeunit and then send that bigtext to an XML Port - that process works for all 3 flavours of NAV 2009. I find this works really well with XSD based classes in .NET and I generate serializable class structures in c# - you then serialize or de-serialize any xml documents flowing to NAV.
R2 (I'm not sure about SP1) allows you to specify an XML port natively as a function parameter.
The reason I like building XSD based classes is that I can then use them as part of any business/data logic in a web application that is easily transmitted to NAV - it's important that you build your XML Ports in NAV to match the XSD's!!
(for those of you who don't know what XSD is - hit up google, look for xml schema definition)0 -
Hi Jeff,
Thank you for your tips. While waiting for some help i googled and found your suggestion for Dynamics NAV 2009 R2:
"R2 (I'm not sure about SP1) allows you to specify an XML port natively as a function parameter."
Once again, thank you for your help.
Regards
Hugo Silveira
XMAN0 -
Do you have control of the web portal?
With the application tier, you can call functions in codeunits and pass them parameters. These parameters are defined fields in the parameter list of the codeunit in Navision. I have coded the functions on the Navision side for .net developers, and from the Navision side it is pretty straightforward.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Maybe you can help in another issue.
i already have a XML port as a function parameter and available as webservice. Can i, at the beginnig of Navision process, save data to a xml file?
Regards.
XMAN0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions