Fixed Text Import in XMLPort

shashinpandeshashinpande Member Posts: 19
edited 2014-06-13 in NAV Three Tier
Hi,

Can anybody explain me how can i import Fixed File in XMLPort ? I tried to build but i got error like "The XML Parser return the following fatal error: Incorrect document syntax : Line Number = 1 Column Number = 1. Also i have set the Property "Format" to "Fixed Text" and set the Width property of Field as well.

Belwo is an example of the file which i have to take into Gen. Journal Line.

04100325 1613 08253 0000000287000-0000000
04100325 1613 11131 0000000005000-0000000

I have solution with Dataport but as you konw it doesn't work with RTC and my client need that in RTC.

Please suggest what can be done to solve this issue.
//Shashin

Comments

  • rdebathrdebath Member Posts: 383
    Because you're testing under 'Classic'?

    Microsoft haven't bothered to write the code for non-XML XMLPorts in Classic, or even have it throw an error.
  • shashinpandeshashinpande Member Posts: 19
    I tried it in RTC Even but it did not work. I got the same error both in RTC and Classic.
    //Shashin
  • RoelofRoelof Member Posts: 377
    I have the same problem.
    Anyone out there who can help with this issue?

    Thanks,
    Roelof de Jonghttp://www.wye.com
  • HanenHanen Member Posts: 281
    Hi, same problem. Can you help me with the solution using dataport???????? :-k
    Regards

    Hanen TALBI
  • aquariousaquarious Member Posts: 32
    Anyone have solution for this? I face the same problem.

    I have created a XMLPort Import and used Codeunit to run the XMLPort Import.

    I create a Link in RTC Menu to call the Codeunit and manage to run XMLPort Import with no error when I click on the link in RTC.

    When i used NAS to run the codeunit I have this error in the Event Viewer.

    'The XML Parser return the following fatal error: Incorrect document syntax. Line Number = 1 Column Number = 1 '

    I have make sure the Codeunit is SingleInstance=Yes and Codeunit 1 configure to call the parameter correctly.

    I m using Microsoft Dynamic Navision 2009 SP2

    Is anyone have the solution could you share over here?

    Thank you
  • ShedexShedex Member Posts: 20
    Hello Aquarius,

    I'm interesting how to run the codeunit with the NAS.

    Do you have any code elements to tell me ?

    How to properly configure the NAS?

    Thanks in advance.
  • Gaurav_RoyGaurav_Roy Member, Microsoft Employee Posts: 6
    If you are using 2009 R2 NAS that is only meant for the classic stack and XMLports can only work with XML in Classic. The "Fixed Text" for XMLPort works only in RTC for 2009 R2. So in R2 if you want to use NAS and fixed text import please use a dataport.
    Gaurav Roy [MSFT]
  • lzrlzr Member Posts: 264
    I am using NAS with NAV 2009 R2 and when I first tried to use dataports I got this error:

    You cannot use C/AL variables of type DATAPORT when running the Application Server for Microsoft Dynamics NAV Classic.

    So I try with XML port, I can't execute it in classic client so I try to run it with NAS, then I get this error:

    The XML Parser return the following fatal error: Incorrect document syntax. Line Number = 1 Column Number = 1

    So what should I do to schedule an import of a text file? ](*,)
    Navision developer
  • rdebathrdebath Member Posts: 383
    You could try calling a Nav web service from the NAS.
    That way it's also possible to have multiple web service connections open, at the same time, from one NAS too.

    Other possibility is to use some other scheduler to call the Nav web services.

    If you can do either of those you're reduced to writing you import/export using a codeunit and FILE variables, rather painful.
  • lzrlzr Member Posts: 264
    Thanks for the answer, I used a codeunit to import it.

    It's just annoying that you don't get any proper error message so you end up searching through the code for hours before you start suspecting the application itself.
    Navision developer
  • bhalpinbhalpin Member Posts: 309
    lzr wrote:
    It's just annoying that you don't get any proper error message so you end up searching through the code for hours before you start suspecting the application itself.

    Amen!!! Just lost a whole morning before this dawned on me. I'd better stop before I really say what I think.

    :thumbsdown:
Sign In or Register to comment.