Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(), true); nd = nd.getFirstChild();
protected Throwable getProtocolException() { try { SOAPFault fault = SOAPVersion.SOAP_11.getSOAPFactory().createFault(faultstring, faultcode); fault.setFaultActor(faultactor); if(detail != null){ Detail d = fault.addDetail(); for(Element det : detail.getDetails()){ Node n = fault.getOwnerDocument().importNode(det, true); d.appendChild(n); } } return new ServerSOAPFaultException(fault); } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected Throwable getProtocolException() { try { SOAPFault fault = SOAPVersion.SOAP_11.getSOAPFactory().createFault(faultstring, faultcode); fault.setFaultActor(faultactor); if(detail != null){ Detail d = fault.addDetail(); for(Element det : detail.getDetails()){ Node n = fault.getOwnerDocument().importNode(det, true); d.appendChild(n); } } return new ServerSOAPFaultException(fault); } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected Throwable getProtocolException() { try { SOAPFault fault = SOAPVersion.SOAP_11.getSOAPFactory().createFault(faultstring, faultcode); fault.setFaultActor(faultactor); if(detail != null){ Detail d = fault.addDetail(); for(Element det : detail.getDetails()){ Node n = fault.getOwnerDocument().importNode(det, true); d.appendChild(n); } } return new ServerSOAPFaultException(fault); } catch (SOAPException e) { throw new WebServiceException(e); } } }
@Override protected void done() { if (!isCancelled()) { try { SOAPMessage msg = get(); if (msg.getSOAPBody().hasFault()) { op.setResponseDocument(msg.getSOAPBody().getFault().getOwnerDocument()); } else { op.setResponseDocument(msg.getSOAPBody().extractContentAsDocument()); } } catch (CancellationException cancelled) { // it was aborted, nothing to do since the // abort method sets the state } catch (ExecutionException e) { //something went awry op.fail(e.getCause()); } catch (Exception e) { //something went awry op.fail(e); } } } }
Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(), true); nd = nd.getFirstChild();
protected Throwable getProtocolException() { try { SOAPFault fault = SOAPVersion.SOAP_12.getSOAPFactory().createFault();; if(reason != null){ for(TextType tt : reason.texts()){ fault.setFaultString(tt.getText()); } } if(code != null){ fault.setFaultCode(code.getValue()); fillFaultSubCodes(fault, code.getSubcode()); } if(detail != null && detail.getDetail(0) != null){ javax.xml.soap.Detail detail = fault.addDetail(); for(Node obj: this.detail.getDetails()){ Node n = fault.getOwnerDocument().importNode(obj, true); detail.appendChild(n); } } if(node != null) { fault.setFaultNode(node); } return new ServerSOAPFaultException(fault); } catch (SOAPException e) { throw new WebServiceException(e); } }
protected Throwable getProtocolException() { try { SOAPFault fault = SOAPVersion.SOAP_12.getSOAPFactory().createFault();; if(reason != null){ for(TextType tt : reason.texts()){ fault.setFaultString(tt.getText()); } } if(code != null){ fault.setFaultCode(code.getValue()); fillFaultSubCodes(fault, code.getSubcode()); } if(detail != null && detail.getDetail(0) != null){ javax.xml.soap.Detail detail = fault.addDetail(); for(Node obj: this.detail.getDetails()){ Node n = fault.getOwnerDocument().importNode(obj, true); detail.appendChild(n); } } if(node != null) { fault.setFaultNode(node); } return new ServerSOAPFaultException(fault); } catch (SOAPException e) { throw new WebServiceException(e); } }
protected Throwable getProtocolException() { try { SOAPFault fault = SOAPVersion.SOAP_12.getSOAPFactory().createFault();; if(reason != null){ for(TextType tt : reason.texts()){ fault.setFaultString(tt.getText()); } } if(code != null){ fault.setFaultCode(code.getValue()); fillFaultSubCodes(fault, code.getSubcode()); } if(detail != null && detail.getDetail(0) != null){ javax.xml.soap.Detail detail = fault.addDetail(); for(Node obj: this.detail.getDetails()){ Node n = fault.getOwnerDocument().importNode(obj, true); detail.appendChild(n); } } if(node != null) { fault.setFaultNode(node); } return new ServerSOAPFaultException(fault); } catch (SOAPException e) { throw new WebServiceException(e); } }