预期的场景:来自Powerbuilder窗口的数据将被传递到将解析数据的服务器,并将生成一个报告,该报告将在powerbuilder窗口的OLE对象中查看。
采取的步骤:
问题
我得到错误-1
这是代码:
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))
返回ls_ret