XML list as webservice to codeunit

NoiK00NoiK00 Member Posts: 51
edited 2013-12-18 in NAV Three Tier
Hi all,

I was curious if Dynamics NAV webservices supports this setup.
When sending a request containing something like this:
<productlist>
  <product id="1">
    <quantity>10</quantity>
  </product>
  <product id="20">
    <quantity>1</quantity>
  </product>
  <product id="30">
    <quantity>2</quantity>
  </product>
</productlist>
Where the productlist contains random sizes/amount of products. Is is possible to "open" this list in a Codeunit, and send it to a XMLport as a filter?

So the Codeunit wil have as parameters something like this:
GetPrice(AccountID : Code[10];xmlitems : [i]unknown object[/i]; VAR products : XMLport GetPrice)  ret : Boolean

Thanks for the help,
NoiK

Comments

  • mdPartnerNLmdPartnerNL Member Posts: 802
    I just downloaded "How Do I Use XMLports in Web Services Calls in Microsoft Dynamics NAV 2013". It looks a bit like your question.

    Did not see the video yet, so maybe not related.
  • NoiK00NoiK00 Member Posts: 51
    ohw sorry , maybe i had to say we're working with 2009. But still i wil check your suggestion.

    Thanx,
    NoiK

    UPDATE: i've watched the video. The possibilities explained in the video aren't describing a solution to my problem.
    I hope someone else already experienced this situation and found a solution for it..

    Thnx
  • NoiK00NoiK00 Member Posts: 51
    hi all,

    I'm still pounding on a solution for the problem i have...
    I can't imagine i'm the only one who tries to use a webservices this way.

    Since my first post i've received some advice; The advice was to use a temporary table where the items are used as a filter in running a second XMLPort to export. Seems the right way. But when running an XMLport import with a temporary table; it seems the temporary table is deleted when the xmlport finishes.

    Anyone has some experience with this?

    thnx, NoiK
Sign In or Register to comment.