Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我得到这个异常是因为响应是soapFault。是否有选项我可以从这个异常中获得整个 xml 响应?我需要这个,因为这个 xml inst 的重要内容, ex.getFaultStringOrReason()但是作为这个 xml 末尾的注释
ex.getFaultStringOrReason()
ex.getSoapFault().getSource()会给你一个Source然后你可以手动检查或编组。
ex.getSoapFault().getSource()
Source
(例如,在 StringResult 上TransformerFactory.newInstance().newTransformer().transform(source, new StringResult()调用 then )toString()
TransformerFactory.newInstance().newTransformer().transform(source, new StringResult()
toString()