Options

Duplicate records - calling webservice

SrivasSrivas Member Posts: 89
edited 2012-01-20 in NAV Three Tier
Hi All,

I am getting duplicate records when I am calling XMLPort (via codeunit) from webservice.

But when I export the data from inside Navision (calling the same xmlport), the data is correctly exported.
Please note that I am using temporary table as source table for this xmlport.

Please help ](*,)

thanks

Answers

  • Options
    kinekine Member Posts: 12,562
    It means that you are using the xmlport as a parameter in function in Codeunit, which is published as webservice?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    deV.chdeV.ch Member Posts: 543
    if you are using xmlport as parameter in a function (as kine asked you):

    Do you manually call xmlport.export in your codeunit function? If so this may cause the problem because you don't have to. The webservice framework does it by itself.
    So maybe you have duplicate records because xmport is executed 2 times, and you have a serious performance impact (doubled execution time).
  • Options
    SrivasSrivas Member Posts: 89
    Thanks for quick reply
    Yes I am calling XMLport from codeunit.

    Xmlport1.export

    But then how do I tell which xmlport to call if I donot mention in codeunit.
  • Options
    SrivasSrivas Member Posts: 89
    It looks like this.
    this is the function in codeunit. I call this function through webservice.


    GetVendors(VAR VendorList : XMLport HBVendorList)
    =======
    VendorList.EXPORT;
  • Options
    kinekine Member Posts: 12,562
    You do not need to use the VendorList.EXPORT. It will be done implicitely at the end of the function. Just try it...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    SrivasSrivas Member Posts: 89
    You guys are gem of NAV community.
    It worked. =D>
  • Options
    SrivasSrivas Member Posts: 89
    Thanks a lot!!!
  • Options
    kinekine Member Posts: 12,562
    You are welcome... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.