Page 1 of 1

WebServices Request

Posted: Wed Jan 27, 2021 9:09 pm
by Iris Gesser
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

Re: WebServices Request

Posted: Wed Jan 27, 2021 10:38 pm
by Iris Gesser
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: Select all

//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
 

Re: WebServices Request

Posted: Thu Jan 28, 2021 12:52 pm
by nageswaragunupudi
Please check your mail.

Re: WebServices Request

Posted: Fri Jan 29, 2021 10:12 am
by AntoninoP
I think it should be enough do

Code: Select all

    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 )