1  /  1  页   1 跳转 查看:880

上传测试问题

上传测试问题

我用光盘的的实例程序上传xml文件,
提示  <?xml version="1.0" encoding="GB2312" ?>
- <Response>
  <ResponseCode>5000</ResponseCode>
  <ResponseDigest />
  <ResponseDetails />
  <Code>500</Code>
- <Info>
  <Digest>操作失败</Digest>
  <Details>未发现XML请求文档</Details>
  </Info>
  </Response>

请问这是什么原因?
 

回复:上传测试问题

我是配置是
服务线路:测试服务器
代理设置:未使用代理
也注册了硬件,
我用光盘里面
机动车合格证管理信息系统v3.0\SDK\Tools\XML Request 3.0
文件夹内的xml进行测试的
 

回复:上传测试问题

光盘中没有上传XML的示例.
上传XML测试应使用 http://localhost:9901/upload.htm 进行
最后编辑00x0 最后编辑于 2009-12-08 14:36:48
 

回复:上传测试问题

我是用pb编写的程序
代码如下:
iole_dom = create OLEObject
  iole_http = create OLEObject
  iole_http.ConnectToNewObject("Msxml2.XMLHTTP.3.0")
  iole_dom.ConnectToNewObject("Msxml2.DOMDocument")   
   
    if not iole_dom.Load(ls_docpath) then
       messagebox('Tip', '传送文件失败。导入中止。')
  End if

  ls_url = 'http://127.0.0.1:9901/XML'
  iole_http.Open("POST", ls_url, false)

  iole_http.setRequestHeader( "SOAPAction", "http://tempuri.org/Load")
  iole_http.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
  iole_http.Send(string(iole_dom.xml))

    do While iole_http.readyState <> 4  //    '  查询状态,延时
        yield()
    Loop
    
  gs_text = iole_http.StatusText + iole_http.responseText
上传xml文件upload_delay.xml时
返回的结果
<?xml version="1.0" encoding="GB2312" ?>
<Response>
<ResponseCode>5000</ResponseCode>
<ResponseDigest></ResponseDigest>
<ResponseDetails></ResponseDetails>
<Code>500</Code>
<Info>
<Digest>操作失败</Digest>
<Details>未发现XML请求文档</Details>
</Info>
</Response>
与上传XML测试页面 http://localhost:9901/upload.htm 进行上传返回的结果不一致?


请问这是什么原因?
 

回复:上传测试问题

XML 方式由于需要POST文件数据(multipart/form-data),使用XMLHTTP很难胜任,建议替换为WinHttp.WinHttprequest.5或InternetExplorer.Application

如使用XMLHTTP建议使用 WebService方式
最后编辑00x0 最后编辑于 2009-12-09 13:00:19
 
1  /  1  页   1 跳转

版权所有 www.vidc.info  国家机动车合格证数据中心网

Powered by Discuz!NT 2.0.1214 (Licensed)    Copyright © 2001-2012 Comsenz Inc.
Processed in 0.03125 second(s) , 3 queries. 京ICP备06025868号
返顶部