Options

SOLVED: Using File Silent File Upload with Webservice

AlexRichterAlexRichter Member Posts: 4
edited 2015-11-20 in NAV Three Tier
Dear community,

we are working on a Load Test Solution for our System (NAV 2015).

One of our Scenarios requires File Upload.
As we figured out already File uploading is not supported by Loadt Test Suite, so we come around with the following Workaround:

We created a Webservice which will invoke the File Upload.
The Websersice Function calls a SetParameter function in the Report which is doing the Excel File Import and sets all necessary Parameters including SilentFileUpload.

If i call the Webservice Function directly from Client it works as expected but the same call via Webservice stops with the follwoing Error in Visual Studio:
Additional information:
Microsoft Dynamics NAV Business Web Services attempted to issue a client callback to create a DotNet object:
System.IO.File (CodeUnit 419 File Management).

Client callbacks are not supported on Microsoft Dynamics NAV Business Web Services.

I identified the ClientFileHelpder Variable in CU 419 as the Error source as its set to run on Client.

wi95wj5ulfrs.png


I could copy the Function and change the Setting but im quite Sure that this will not help as it fill try to upload the temporary file vom server to NAV later on again where i will be having the same issue.


Where you facing the same issue already and having a solution for a scenario like this or some ideas how to solve this issue?

Thanks for your input,

Alex

For those who are on TechDays - Enjoy it :smile:



Answers

  • Options
    JuhaJuha Member Posts: 39
    Your webservice is running on the server, so you don't have to upload the file you can just move it. You need to go around the SilentFileUplaod with GUIAllowed and just move/copy the file to a "ServerFileName"

    /Juha
  • Options
    AlexRichterAlexRichter Member Posts: 4
    Hey Juha,

    you are right, if i bypass the whole File Managment then it works.
    Actually quite an easy straught forward solution. :)

    Thank you
    Alex
  • Options
    irfasyed7irfasyed7 Member Posts: 2
    hey Juha,

    Could you please share me you Solution. I tried a million times and it always a failure.

    Thank you.
    Syed..
Sign In or Register to comment.