Webservice: Codeunit with XmlPort as parameter doesn't work?

BlackBirdBlackBird Member Posts: 52
edited 2013-04-17 in NAV Three Tier
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?

Comments

  • mostafabalatmostafabalat Member, Microsoft Employee Posts: 5
    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.
  • BlackBirdBlackBird Member Posts: 52
    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.
Sign In or Register to comment.