Hi Guys
I'm trying to post to a webservice and I'm struggling to get the right concepts for PowerBuilder.
The URL is https://pms.verticalbooking.com/mainstay/OTA_PMS.php
the Message format is:
What is the best way to approach this?
have tried using the following code and Rolands winhttp
// example HTTP POST in the style of the PostURL function
n_winhttp ln_http
String ls_URL, ls_title, ls_pathname, ls_filename
String ls_filter, ls_data, ls_mimetype, ls_response, ls_time
Blob lblob_data, lblob_response
Integer li_rc, li_fnum
ULong lul_length
lblob_data = blob('
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
ls_mimetype = ln_http.GetMIMEType(ls_pathname, lblob_data)
ls_URL = "https://pms.verticalbooking.com/mainstay/OTA_PMS.php"
lul_length = ln_http.Postsoap(ls_URL, &
lblob_data, ls_mimetype, lblob_response,'OTA_PMS')
If lul_length > 0 Then
ls_response = String(lblob_response, EncodingAnsi!)
ls_time = "Post Complete in " + &
String(ln_http.Elapsed, "#,##0.####") + " seconds."
messagebox('Response',ls_response)
Else
MessageBox("PostURL Error #" + &
String(ln_http.LastErrorNum), &
ln_http.LastErrorText, StopSign!)
End If
Cheers David