Options

Calling Code unit from webservice n reading xml in it

kamranshehzadkamranshehzad Member Posts: 165
edited 2009-02-03 in NAV Three Tier
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,
KS

Answers

  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    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.
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    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,
    KS
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    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,
    KS
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    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 conver
    KS
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    can do it with text.. but can't do with big text. it says invalid stream mode.

    regards,
    KS
Sign In or Register to comment.