Hello boys,
Is a possible to public a codeunit-web services that used a I stream parameter?
I have to send a stream from a service .NET C# to one webservice-codeunit NAV2013?
I have tried to do,but when I referred the codeunit with visual studio 2013, I received
An error on metada, if I delete a I stream parameter from the codeunit all work fine.
Can you help me?
0
Answers
If you have a pointer to a file in your computer you cannot send it to a remote server, because it will not have access to your machine file.
What you can do, is read all the data from a stream, and send that data to NAV.
string allData = new StreamReader(dataStream).ReadToEnd();
If your data is binary, then you will also have to convert it to Base64 to be able to transfer it.
Regards,
Carlos.