Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(), true); nd = nd.getFirstChild();
if (sf.hasDetails()) { soapFault.addDetail(); Node nd = soapMessage.getSOAPPart().importNode(sf.getDetail(), true); nd = nd.getFirstChild(); while (nd != null) {
if (sf.hasDetails()) { soapFault.addDetail(); Node nd = originalMsg.getSOAPPart().importNode(sf.getDetail(), true); nd = nd.getFirstChild(); while (nd != null) {
Element detail = fault.getDetail(); String soapNamespace = message.getVersion().getNamespace(); if (detail == null) {
Element detail = fault.getDetail(); String soapNamespace = message.getVersion().getNamespace(); if (detail == null) {
public SoapFaultException(MuleEvent event, SoapFault soapFault, MessageProcessor failingMessageProcessor) { super(CoreMessages.createStaticMessage(soapFault.getMessage()), event, soapFault, failingMessageProcessor); this.faultCode = soapFault.getFaultCode(); this.subCode = soapFault.getSubCode(); this.detail = soapFault.getDetail(); }
Element detail = fault.getDetail(); writer.writeStartElement("detail");
Element detail = fault.getDetail(); writer.writeStartElement("detail");
faultMessageValidator = new PlainTextTestResource(expectedValue.getMessage()); codeValidator = new QNameValidator(expectedValue.getFaultCode()); if (expectedValue.getDetail() != null) detailValidator = new XmlTestResource(expectedValue.getDetail().getOwnerDocument()); } catch (Exception ex) { throw new RuntimeException(ex); detailExchange.getIn().setBody(fault.getDetail()); validDetail = detailValidator.matches(detailExchange); String detail = xmlUtilities.getDocumentAsString(fault.getDetail()); if (!validDetail) logger.warn("The SOAP Fault detail is not as expected; received {}", detail);
Element detail = fault.getDetail(); writer.writeStartElement(defaultPrefix, "Detail", ns);
Element detail = fault.getDetail(); writer.writeStartElement(defaultPrefix, "Detail", ns);
@Override protected MuleEvent processNext(MuleEvent event) throws MuleException { try { return super.processNext(event); } catch (DispatchException e) { /* * When a Soap Fault is returned in the response, CXF raises a SoapFault exception. We need to wrap * the information of this exception into a new exception of the WS consumer module */ if (e.getCause() instanceof SoapFault) { SoapFault soapFault = (SoapFault) e.getCause(); event.getMessage().setPayload(soapFault.getDetail()); throw new SoapFaultException(event, soapFault, this); } else { throw e; } } }
private Object[] invoke(SoapRequest request, Exchange exchange, MessageDispatcher dispatcher) { String operation = request.getOperation(); XMLStreamReader xmlBody = getXmlBody(request); try { Map<String, Object> ctx = getInvocationContext(request, dispatcher); return client.invoke(getInvocationOperation(), new Object[] {xmlBody}, ctx, exchange); } catch (SoapFault sf) { throw new SoapFaultException(sf.getFaultCode(), sf.getSubCode(), parseExceptionDetail(sf.getDetail()).orElse(null), sf.getReason(), sf.getNode(), sf.getRole(), sf); } catch (Fault f) { if (f.getMessage().contains("COULD_NOT_READ_XML")) { throw new BadRequestException("Error consuming the operation [" + operation + "], the request body is not a valid XML"); } throw new SoapFaultException(f.getFaultCode(), parseExceptionDetail(f.getDetail()).orElse(null), f); } catch (DispatchingException e) { throw e; } catch (OperationNotFoundException e) { String location = wsdlModel.getLocation(); throw new BadRequestException("The provided [" + operation + "] does not exist in the WSDL file [" + location + "]", e); } catch (Exception e) { throw new SoapServiceException("Unexpected error while consuming the web service operation [" + operation + "]", e); } }
Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(), true); nd = nd.getFirstChild();
if (sf.hasDetails()) { soapFault.addDetail(); Node nd = soapMessage.getSOAPPart().importNode(sf.getDetail(), true); nd = nd.getFirstChild(); while (nd != null) {
if (sf.hasDetails()) { soapFault.addDetail(); Node nd = originalMsg.getSOAPPart().importNode(sf.getDetail(), true); nd = nd.getFirstChild(); while (nd != null) {