FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour WebServices Request
Posts: 38
Joined: Fri Apr 22, 2016 10:19 PM
WebServices Request
Posted: Wed Jan 27, 2021 09:09 PM
Good evening,

may I ask you for your help?

I have to make a request with webservice to receive a list of guests who had made a precheckin on a website, but unfortunately I am not able to do it.
I can reach the TEST-server:
http://visitortaxtest.deskline.net/Serv ... MSVRExport
but getting errors that have to do with my request.

It should look like this
POST /Services.asmx/PMSVRExport? HTTP/1.1
Host: visitortaxtest.deskline.net
Content-Type: application/x-www-form-urlencoded

betriebnr=XXXXXX&companyCode=VTPMSTEST&communityNumber=12345&stringDateFrom=2020-01-01&stringDateTo=2020-01-20


Can you please help me to find the right form for my request?
Do you need farther information?

Thank you very much and kind regards
Iris
Posts: 38
Joined: Fri Apr 22, 2016 10:19 PM
Re: WebServices Request
Posted: Wed Jan 27, 2021 10:38 PM
I think, the request is done in a really wrong way. Do you think, that the 4 first lines are needed? Because the same information is put in the post...
Code (fw): Select all Collapse
//REQUEST START
    cPost :=      "POST /Services.asmx/PMSVRExport HTTP/1.1" + CRLF ;
    cPost := cPost + "Host: visitortaxtest.deskline.net" + CRLF ;
    cPost := cPost + "Content-Type: application/x-www-form-urlencoded" + CRLF ;
    cPost := cPost + "Content-Length: lengtht" + CRLF ;
    cPost := cPost + "betriebnr=30346&companyCode=VTPMSTEST&communityNumber=41503&stringDateFrom=2020-01-01&stringDateTo=2021-01-31"
//REQUEST ENDE

//URL START                 
    cURL := "http://visitortaxtest.deskline.net/Services.asmx?op=PMSVRExport"   
//URL ENDE  
    
//POST START        
    loHyperlink:Open( "POST", cURL, .f. ) 
    loHyperlink:setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
    loHyperlink:Send(cPost )
//POST ENDE
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: WebServices Request
Posted: Thu Jan 28, 2021 12:52 PM

Please check your mail.

Regards



G. N. Rao.

Hyderabad, India
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: WebServices Request
Posted: Fri Jan 29, 2021 10:12 AM
I think it should be enough do
Code (fw): Select all Collapse
    cPost := "betriebnr=30346&companyCode=VTPMSTEST&communityNumber=41503&stringDateFrom=2020-01-01&stringDateTo=2021-01-31"
    cURL := "http://visitortaxtest.deskline.net/Services.asmx?op=PMSVRExport"  
    loHyperlink := CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
    loHyperlink:Open( "POST", cURL, .f. ) 
    loHyperlink:setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
    loHyperlink:Send(cPost )

Continue the discussion