Hi all,
I have one codeunit which have all my webservices methods.
On of them, named ImportSalesOrder, should receive data but instead of create a new sales order, should save the XML message into file.
My code is something like this but the file created is empty.
CLEAR(OutStream);
IF ISCLEAR(XMLDocument) THEN
CREATE(XMLDocument);
XML.SETDESTINATION(OutStream);
XML.IMPORT;
XMLDocument.load(OutStream);
XMLDocument.save(FileName);
EXIT(TRUE);
Can anyone have some ideas how can i solve this? ](*,)
Thanks in advance.
Best Regards
SMH_PTG0
Comments
SMH_PTG
I traded my sanity for a railgun
Problem Solved. Import for a temporary table and the export from temp to file.
XMLvar.IMPORT;
Filename := 'd:\test.xml';
FileToCreate.CREATE(FileName);
FileToCreate.CREATEOUTSTREAM(Outstream);
XMLvar.SETDESTINATION(Outstream);
XMLvar.EXPORT;
FileToCreate.CLOSE;
Thanks,
SMH_PTG
I traded my sanity for a railgun