PB怎么样可以完成HTTPS协议传输

idzlw 2013-08-19 12:21:21
PB怎么样可以完成HTTPS协议传输
...全文
7657 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
北京大丸子 2014-06-07
  • 打赏
  • 举报
回复
引用 9 楼 tonyu 的回复:
同问,有没有解决的方法?可否QQ聊聊?我的QQ:623868893
http://bbs.csdn.net/topics/390712602
tonyu 2014-06-07
  • 打赏
  • 举报
回复
同问,有没有解决的方法?可否QQ聊聊?我的QQ:623868893
niexiancheng 2014-03-01
  • 打赏
  • 举报
回复
posturl
北京大丸子 2014-02-14
  • 打赏
  • 举报
回复
引用 2 楼 AFIC 的回复:
凑合用Microsoft.XMLHttp吧,付个烂代码凑合看吧 String ls_url,ls_data,ls_response ls_url = 'https://passport.uuzu.com/login.php' ls_data = 'act=login&rurl=http://10.uuzu.com&username=name&password=pass' OleObject lole_tenyear lole_tenyear = CREATE oleobject lole_tenyear.ConnectToNewObject("Microsoft.XMLHttp") // //lole_tenyear.ConnectToNewObject('WinHttp.WinHttpRequest.5.1') lole_tenyear.open ("POST",ls_url, false) lole_tenyear.setRequestHeader ("Content-type", "application/x-www-form-urlencoded") lole_tenyear.setRequestHeader('Content-Length',string(len(ls_data))) lole_tenyear.send (ls_data) ls_response = lole_tenyear.responseText m(ls_response) IF lole_tenyear.Status >= 300 THEN MessageBox ("HTTP request failed:", lole_tenyear.StatusText ,Exclamation!,OK!) END IF // destroy lole_tenyear
您的代码,我复制到pb里面,发现走到send那一步报错,说ole的问题:error calling external object function send at line18 in clicked event of object cb_1 of w1 但我看过xmlhttp的说明,没发现什么错误,请帮忙分析分析
提前十分钟 2013-08-26
  • 打赏
  • 举报
回复
引用 4 楼 dx5zhou 的回复:
我也碰到类似的接口,要求如下: 一、数据格式 1. 数据采用xml 2. Xml定义参考xml示例文件 3. Xml必须通过Schema 验证(Schema见文件夹) 4. 数据字典在选项xml文件夹下 请求地址 http://www.cnstroke.com/ DataInterface/ ArchivesAdd.ashx 请求类型 POST 请求参数 参数类型 备注 xmlStr string Xml字符串 uuid string 单位编码 authCode string 单位接口授权码 不知道怎么弄。。
用PB不知道怎么用,可以用其它语言完成,在PB里调用,其实PB已经提供现成的,楼上的方法也已经很明确
dx5zhou 2013-08-21
  • 打赏
  • 举报
回复
我也碰到类似的接口,要求如下: 一、数据格式 1. 数据采用xml 2. Xml定义参考xml示例文件 3. Xml必须通过Schema 验证(Schema见文件夹) 4. 数据字典在选项xml文件夹下 请求地址 http://www.cnstroke.com/ DataInterface/ ArchivesAdd.ashx 请求类型 POST 请求参数 参数类型 备注 xmlStr string Xml字符串 uuid string 单位编码 authCode string 单位接口授权码 不知道怎么弄。。
dx5zhou 2013-08-21
  • 打赏
  • 举报
回复
servicereference.PostURL ( urlname, urldata, headers, {serverport, } data ) Blob lblb_argsString ls_headersString ls_urlLong ll_lengthiir_msgbox = CREATE n_ir_msgboxls_url = "http://coltrane.sybase.com/"ls_url += "cgi-bin/pbcgi60.exe/"ls_url += "myapp/n_cst_html/f_test?"lblb_args = blob("")ll_length = Len(lblb_args)ls_headers = "Content-Length: " & + String(ll_length) + "~n~n"iinet.PostURL & (ls_url, lblb_args, ls_headers, 8080, iir_msgbox)This example shows the use of a header with the correct content-type for a form: Blob lblb_argsString ls_headersString ls_urlString ls_argslong ll_lengthinteger li_rc li_rc = GetContextService( "Internet", iinet_base )IF li_rc = 1 THEN ir = CREATE n_ir ls_url = "http://localhost/Site/testurl.stm?" ls_args = "user=MyName&pwd=MyPasswd" lblb_args = Blob( ls_args ) ll_length = Len( lblb_args ) ls_header = "Content-Type: " + & "application/x-www-form-urlencoded~n" + & "Content-Length: " + String( ll_length ) + "~n~n" li_rc = iinet.PostURL( ls_url, lblb_args, & ls_header, ir )END IF
北京大丸子 2013-08-19
  • 打赏
  • 举报
回复
这个技术我也在找,但现在好像没方案,http的也比较牵强,容易出错 请高手帮忙,帮顶了。
AFIC 2013-08-19
  • 打赏
  • 举报
回复
凑合用Microsoft.XMLHttp吧,付个烂代码凑合看吧 String ls_url,ls_data,ls_response ls_url = 'https://passport.uuzu.com/login.php' ls_data = 'act=login&rurl=http://10.uuzu.com&username=name&password=pass' OleObject lole_tenyear lole_tenyear = CREATE oleobject lole_tenyear.ConnectToNewObject("Microsoft.XMLHttp") // //lole_tenyear.ConnectToNewObject('WinHttp.WinHttpRequest.5.1') lole_tenyear.open ("POST",ls_url, false) lole_tenyear.setRequestHeader ("Content-type", "application/x-www-form-urlencoded") lole_tenyear.setRequestHeader('Content-Length',string(len(ls_data))) lole_tenyear.send (ls_data) ls_response = lole_tenyear.responseText m(ls_response) IF lole_tenyear.Status >= 300 THEN MessageBox ("HTTP request failed:", lole_tenyear.StatusText ,Exclamation!,OK!) END IF // destroy lole_tenyear

662

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder Web 应用
社区管理员
  • Web 应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧