apache-cxf クライアントでの例外の処理に問題があります。SOAP 呼び出し 'Fault_Exception' によってスローされる例外を予期していますが、常に一般的な SOAPFaultException を受け取っています。
生成されたクラス:
@WebFault(name = "FaultMessage", targetNamespace = "http://a.b.c/ws/")
public class Fault_Exception extends Exception {
private a.b.c.Fault faultMessage;
....
}
そしてフォルトは
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fault", propOrder = {
"code",
"description",
"stack"
})
public class Fault {
...
}
石鹸:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>EXCEPTION</faultstring>
<detail>
<Fault xmlns:n1="http://a.b.c/ws/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://a.b.c/ws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="n1:fault">
<code xmlns="http://a.b.c/ws/">error.code.1</code>
<description xmlns="http://a.b.c/ws/">some description of the error.</description>
<stack xmlns="http://a.b.c/ws/">....</stack>
</Fault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
生成されたクラスと応答の間に不一致はありますか? または、他に何が問題になる可能性がありますか?それとも、SOAPFaultException を取得するのは完全にロジックですか? 情報(コードと説明)を取得する方法がわかりません...
敬具!