我想找出使用 oasis xsd 解析响应的最佳方法。我有以下响应 xml 字符串,但不知道如何解析它,我尝试从 oasis 复制 xsd 但无法创建 jaxb 对象。这是 xml 响应数据:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-521833581">
<wsu:Created>2017-09-07T00:00:02.002Z</wsu:Created>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:c="urn:schemas-visa-com:transaction-data-1.0">
<faultcode>wsse:FailedCheck</faultcode>
<faultstring>
Security Data : UsernameToken authentication failed.
</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>