解析来自asp的soap响应 [英] Parsing soap response from asp
问题描述
我有一个soap请求返回如下响应:
I have a soap request returning a response like below:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:authkeyResponse xmlns:ns1="urn:authkey">
<return xsi:type="xsd:string">ALREADY REGISTERED</return>
</ns1:authkeyResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我按照 http 中的示例使用 vb 脚本调用肥皂://kapie.com/2007/consuming-soap-web-services-from-vbscript.我在 strSoapReq 对象中得到了整个 xml,但不确定如何解析它,以便我只能弹出已注册"的结果.
I am invoking the soap using vb script by following the example from http://kapie.com/2007/consuming-soap-web-services-from-vbscript. I get this whole xml in the strSoapReq object but not sure how to parse it so that I can popup only the result which is "ALREADY REGISTERED".
推荐答案
根据您提供的链接中的示例,请确保显式调用 GetResult
.
From the example from the link you gave, make sure you call GetResult
explicitly.
如果您按照示例并根据您的 SOAP 结果,它应该是:
If you followed the example and based on your SOAP result, it should be:
GetResult(strResult, "result")
这篇关于解析来自asp的soap响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!