+ -
当前位置:首页 → 问答吧 → js 如何获得webservice返回的soapxml

js 如何获得webservice返回的soapxml

时间:2010-12-14

来源:互联网

过程为: js 通过ajax 调用 webservice 


SOAP 1.2
以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。

POST /jdvn/jdvnsystemservice/DVNProgramMgrService.asmx HTTP/1.1
Host: 192.168.213.97
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
  <objTest xmlns="http://JetsenNet/JDVN/" />
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
  <objTestResponse xmlns="http://JetsenNet/JDVN/">
  <objTestResult>
  <errorCode>int</errorCode>
  <errorString>string</errorString>
  <resultVal>string</resultVal>
  </objTestResult>
  </objTestResponse>
  </soap12:Body>
</soap12:Envelope>


如何通过js 和 ajax 的responseXML 来获得<resultVal>里的内容呢?

作者: colorfulbinary   发布时间: 2010-12-14

各位高手!在线等!小弟弄了一天了!头都大了!帮帮忙!

作者: colorfulbinary   发布时间: 2010-12-14