Webservice: Codeunit with XmlPort as parameter doesn't work?
BlackBird
Member Posts: 52
Hi all,
I have a codeunit that has functions that use a xmlport as a parameter. This codeunit is published as a webservice and we use it to display data on a website, which works perfectly.
I'm trying to use this codeunit to build a windows store app using Visual Studio Express 2012 but i can't use any of the functions containing de xmlport as a parameter.
When i add my webservice as a service reference i get the message 'Failed to generate code for the service reference 'Letters' and i can't use this webservice. When i remove the xmlport i can add the service reference and use the other functions that doesn't take these parameters.
Clearly VS doesn't like this.
Is there a solution or a workaround for this?
I have a codeunit that has functions that use a xmlport as a parameter. This codeunit is published as a webservice and we use it to display data on a website, which works perfectly.
I'm trying to use this codeunit to build a windows store app using Visual Studio Express 2012 but i can't use any of the functions containing de xmlport as a parameter.
When i add my webservice as a service reference i get the message 'Failed to generate code for the service reference 'Letters' and i can't use this webservice. When i remove the xmlport i can add the service reference and use the other functions that doesn't take these parameters.
Clearly VS doesn't like this.
Is there a solution or a workaround for this?
0
Comments
-
What about passing the XMLPort ID as an integer through your Web Service to NAV? If so, you can run the XMLPort as mentioned in: http://msdn.microsoft.com/en-us/library/ee909560(v=nav.70).aspx.0
-
Thanks for the reply, but in my case that won't work. By using a xmlport as a parameter by Var you can return data very easilty and quickly.
I've made a workaround by streaming the xml into a blob and than returning the xml-data as text. In NAV 2013 a string returnvalue can hold more than 1024 characters.
In NAV 2009 however this still won't work.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions