Running XMLPort from webservice

balhinio
Member Posts: 28
Hi all,
I have a codeunit that run an XMLPort to export a table. When I run the code unit directly from Navision every thing is ok
but when I expose the code unit as a web service and I call it there is no result: no file was exported!!
the following is the code unit:
TestFile.CREATE('C:\\XXXX.xml') ;
TestFile.CREATEOUTSTREAM(TestStream);
XMLPORT.EXPORT(50099,TestStream);
TestFile.CLOSE;
Thanks for help
I have a codeunit that run an XMLPort to export a table. When I run the code unit directly from Navision every thing is ok
but when I expose the code unit as a web service and I call it there is no result: no file was exported!!
the following is the code unit:
TestFile.CREATE('C:\\XXXX.xml') ;
TestFile.CREATEOUTSTREAM(TestStream);
XMLPORT.EXPORT(50099,TestStream);
TestFile.CLOSE;
Thanks for help
0
Comments
-
Is there any error in event log? or do you receive a success or failure response when you call the function from your client that consumes the NAV webservice?0
-
There is no error or warning in the eventlog.
I had change the code unit as the following:
TestFile.CREATE('C:\\XXXX.xml') ;
TestFile.CREATEOUTSTREAM(TestStream);
XMLPORT.EXPORT(50099,TestStream);
TestFile.CLOSE;
exit(true);
from the web service the code unit return the bolean value correctly!! so the is no exeption here!
but no file was created!!!!0 -
Can you please try to get the result from the XMLPort.
[{Ok} :=] XMLPORT.EXPORT(Number, OutStream [, Record])
What is the return from the export ?
Regards,
egnaz0 -
Also does the user that the nav service running under have permission to write to that directory?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions