【发布时间】:2019-05-11 22:18:21
【问题描述】:
如何解析 SOAP 消息中的特定部分并获取它们的值?
例如,如果soap响应消息是这样的:
<?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>
<GetCountryListResponse xmlns="http://example.org/">
<GetCountryListResult>
<string>string</string>
<string>string</string>
</GetCountryListResult>
</GetCountryListResponse>
</soap12:Body>
</soap12:Envelope>
我想获取 GetCountryListResult 值并将其保存到字符串变量中。
我在 Java 中找到了一个很好的答案:
【问题讨论】:
标签: c# asp.net .net web-services soap