How To Receive PDF by webservice through HTTP POST
                
                    nyonik                
                
                    Member Posts: 3                
            
                        
            
                    Hi to Everybody. First of all sorry for my English, but I don't write in english very soon....
I need help about requesting a .pdf file (for example the stamp of a Sales Invoice) from NAV and receiving it by the webservice through HTTP POST.
I have already written the code to send the request to the webservice like this:
CREATE(locautoHTTPPOST);
locautoHTTPPOST.Open('POST','https://www.g*****way.it/g*******new/ricercadocumentipost.aspx');
Testo := 'CodiceLicenza' + '=' + 'G00*****' +
'&' + 'CodiceAziendaSIA' + '=' + 'P***P' +
'&' + 'Nickname' + '=' + 'webservice' +
'&' + 'Password' + '=' + '6******3' +
'&' + 'CodiceGrafica' + '=' + 'F' +
'&' + 'NomeCampoRicerca' + '=' + 'G0000371_CAMPO2' +
'&' + 'ValoreCampoRicercaa' + '=' + 'VB09-00001';
locautoHTTPPOST.Send(Testo);
locautoHTTPPOST is ean AUTOMATION of Microsoft WinHTTP Services
Testo is a Text Variable in wich i store some values of the document i want to receive form the webservice (written following the vendor of the webservice guidelines)
Now that i have sended the request I expect the webservice to respond sending the pdf, but i don't know how to receive it, and see it or save it in a file...
Could you help me in some way?
Thanks to all of you!!!
                I need help about requesting a .pdf file (for example the stamp of a Sales Invoice) from NAV and receiving it by the webservice through HTTP POST.
I have already written the code to send the request to the webservice like this:
CREATE(locautoHTTPPOST);
locautoHTTPPOST.Open('POST','https://www.g*****way.it/g*******new/ricercadocumentipost.aspx');
Testo := 'CodiceLicenza' + '=' + 'G00*****' +
'&' + 'CodiceAziendaSIA' + '=' + 'P***P' +
'&' + 'Nickname' + '=' + 'webservice' +
'&' + 'Password' + '=' + '6******3' +
'&' + 'CodiceGrafica' + '=' + 'F' +
'&' + 'NomeCampoRicerca' + '=' + 'G0000371_CAMPO2' +
'&' + 'ValoreCampoRicercaa' + '=' + 'VB09-00001';
locautoHTTPPOST.Send(Testo);
locautoHTTPPOST is ean AUTOMATION of Microsoft WinHTTP Services
Testo is a Text Variable in wich i store some values of the document i want to receive form the webservice (written following the vendor of the webservice guidelines)
Now that i have sended the request I expect the webservice to respond sending the pdf, but i don't know how to receive it, and see it or save it in a file...
Could you help me in some way?
Thanks to all of you!!!
0                
            Comments
- 
            viewtopic.php?t=23618
it's the same principle.
Also follow the links on this post: viewtopic.php?f=23&t=35176
ara3n post in his BLOG some examples and will also create a detailed step by step process on how to use web services.
RegardsDo you make it right, it works too!0 - 
            Thanks for the answer.
But the problem is that i want to receive a .pdf file, and not a .xml one.
It is the same? or i have to use different automation to handle .pdf ?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
 - 323 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