- David Peace (Powersoft)
- PowerBuilder
- Friday, 19 January 2018 03:56 PM UTC
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:
uuid:bc12ff01-2329-f0dc-84e9-12ae9b579f32
3r799d6yq6
y3ppi58t20
My Test Data
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('' + &
' ' + &
' uuid:bc12ff01-2329-f0dc-84e9-12ae9b579f32' + &
' ' + &
'' + &
'3r799d6yq6' + &
'y3ppi58t20' + &
'' + &
' ' + &
' ' + &
' ' + &
' ' + &
' My Test Data' + &
' ' + &
' ' + &
'')
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')
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
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.