Calling Code unit from webservice n reading xml in it

kamranshehzad
Member Posts: 165
Hi I want to achieve the following.
I want to call code unit through webservice ( expose code unit as web service ) and pass xml to it.
I want to save that xml and then read it and import it through xml port.
I am trying to write a code unit and declared XMLIN variable as paramter (automaticion xml ) and trying to save it. It gives me assignment error.
Can any one guide me here?
I am just new to nav coding...
hope you some one will help me out here.
regards,
I want to call code unit through webservice ( expose code unit as web service ) and pass xml to it.
I want to save that xml and then read it and import it through xml port.
I am trying to write a code unit and declared XMLIN variable as paramter (automaticion xml ) and trying to save it. It gives me assignment error.
Can any one guide me here?
I am just new to nav coding...

regards,
KS
0
Answers
-
You cannot transfer automation objects as parameters via Web Services - you can transfer Text and BigText and then do what you want.
But you could also transfer the XML directly to an XMLPort parameter - which in effect will run the XMLPort with your Input and then run the function.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Fine. What I am thinking to do in that case is to transfer xml using big text to code unit through webserive (by exposing code unit to web service ) and use CU to pass it to XMLPort.
I hope this should do the job.
Any recommendations?
regards,KS0 -
I am facing a problem by receiving xml as big text in code unit and then passing it to xml port.
I even can't save it in xml file.. it gives type convertion error. any help ?
regards,KS0 -
I am facing a problem by receiving xml as big text in code unit and then passing it to xml port.
I even can't save it in xml file.. it gives type converKS0 -
can do it with text.. but can't do with big text. it says invalid stream mode.
regards,KS0
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