मैं एक SoapFaultClientException द्वारा भेजे गए दोष विस्तार से कैसे मिल सकती है? मैं जैसा कि नीचे दिखाया एक WebServiceTemplate का उपयोग करें:वसंत और वेब सेवा ग्राहक - दोष विस्तार
WebServiceTemplate ws = new WebServiceTemplate();
ws.setMarshaller(client.getMarshaller());
ws.setUnmarshaller(client.getUnMarshaller());
try {
MyResponse resp = (MyResponse) = ws.marshalSendAndReceive(WS_URI, req);
} catch (SoapFaultClientException e) {
SoapFault fault = e.getSoapFault();
SoapFaultDetail details = e.getSoapFault().getFaultDetail();
//details always NULL ? Bug?
}
वेब सेवा दोष भेजा सही लगता है:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Validation error</faultstring>
<faultactor/>
<detail>
<ws:ValidationError xmlns:ws="http://ws.x.y.com">ERR_UNKNOWN</ws:ValidationError>
</detail>
</soapenv:Fault>
</soapenv:Body>
धन्यवाद
के लिए Willome
SoapFaultClientException क्या होगा। Javadocs में बताए गए भाग को भाग WebServiceClientException है। SoapFaultClientException उस अपवाद का उप-वर्ग है। –