- I am working in Powerbuilder technology.
- An OLE web browser object is defined in a window of the Powerbuilder.
Expected scenerio: Data from the Powerbuilder window will be passed to the server where the data will be parsed and a report will be generated which will be viewed in the OLE object in the powerbuilder window.
Steps taken:
- Used powerbuilder's PostURL method to send the data to the server
- While sending data from the Powerbuilder window to the server, the data is XML structure that i need to sand to WS
Problem
i get error -1
here is the code:
string ls_ret = ''
InternetResult ls_result
blob urldata
urldata = blob("")
string urlname = "http://secure.telemessage.com/partners/xmlMessage.jsp"
long ll_ret, ll_length
string ls
ls = '<?xml version="1.0" encoding="UTF-8" ?><TELEMESSAGE><TELEMESSAGE_CONTENT><MESSAGE><MESSAGE_INFORMATION><SUBJECT></SUBJECT></MESSAGE_INFORMATION><USER_FROM><CIML><NAML><LOGIN_DETAILS><USER_NAME>carelaser</USER_NAME><PASSWORD>11235813</PASSWORD></LOGIN_DETAILS></NAML></CIML></USER_FROM><MESSAGE_CONTENT><TEXT_MESSAGE><MESSAGE_INDEX>0</MESSAGE_INDEX><TEXT>test 1</TEXT> </TEXT_MESSAGE></MESSAGE_CONTENT> <USER_TO><CIML><DEVICE_INFORMATION> <DEVICE_TYPE DEVICE_TYPE="SMS"/><DEVICE_VALUE>0502201630</DEVICE_VALUE></DEVICE_INFORMATION></CIML></USER_TO></MESSAGE></TELEMESSAGE_CONTENT><VERSION>1.6</VERSION></TELEMESSAGE>'
ll_length = Len(ls)
string urlheader = "Content-Type: application/xml~n"
urlheader +="Content-Length: " + String(ll_length) + "~n~n"
urldata =blob(ls)
GetContextService("Internet", iinet_base)
messagebox("urlname", urlname)
messagebox("urlheader", urlheader)
messagebox("urldata",string(urldata))
ll_ret = iinet_base.posturl(urlname, urldata , urlheader, ls_result)
messagebox("Return: " + string(ll_ret) ,string(ls_result))
Return ls_ret