WebServices Request

WebServices Request

Postby Iris Gesser » Wed Jan 27, 2021 9: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
User avatar
Iris Gesser
 
Posts: 37
Joined: Fri Apr 22, 2016 10:19 pm

Re: WebServices Request

Postby Iris Gesser » 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: Select all  Expand view
//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
 
User avatar
Iris Gesser
 
Posts: 37
Joined: Fri Apr 22, 2016 10:19 pm

Re: WebServices Request

Postby nageswaragunupudi » Thu Jan 28, 2021 12:52 pm

Please check your mail.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: WebServices Request

Postby AntoninoP » Fri Jan 29, 2021 10:12 am

I think it should be enough do
Code: Select all  Expand view

    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 )
 
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Silvio.Falconi and 79 guests