public String getFaultString() { if (this.omTarget.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { return this.omTarget.getReason().getText(); } else { if (this.omTarget.getReason() != null && this.omTarget.getReason().getFirstSOAPText() != null) { return this.omTarget.getReason().getFirstSOAPText().getText(); } } return null; }
public String getFaultString() { if (this.omTarget.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { return this.omTarget.getReason().getText(); } else { if (this.omTarget.getReason() != null && this.omTarget.getReason().getFirstSOAPText() != null) { return this.omTarget.getReason().getFirstSOAPText().getText(); } } return null; }
private void setFaultCode(MessageContext synCtx, SOAPFactory factory, SOAPFault fault, int soapVersion) { QName fault_code = null; if (faultCodeValue == null && faultCodeExpr == null) { handleException("A valid fault code QName value or expression is required", synCtx); } else if (faultCodeValue != null) { fault_code = faultCodeValue; } else { String codeStr = faultCodeExpr.stringValueOf(synCtx); fault_code = new QName(fault.getNamespace().getNamespaceURI(),codeStr); } SOAPFaultCode code = factory.createSOAPFaultCode(); switch (soapVersion) { case SOAP11: code.setText(fault_code); break; case SOAP12: SOAPFaultValue value = factory.createSOAPFaultValue(code); value.setText(fault_code); break; } fault.setCode(code); }
private SOAPFault addStandardFault(String localName, String faultString, Locale locale) { Assert.notNull(faultString, "No faultString given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode faultCode = getAxiomFactory().createSOAPFaultCode(fault); faultCode.setText(new QName(fault.getNamespace().getNamespaceURI(), localName, fault.getNamespace().getPrefix())); SOAPFaultReason faultReason = getAxiomFactory().createSOAPFaultReason(fault); if (locale != null) { addLangAttribute(locale, faultReason); } faultReason.setText(faultString); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
private SOAPFault addStandardFault(String localName, String faultString, Locale locale) { Assert.notNull(faultString, "No faultString given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode faultCode = getAxiomFactory().createSOAPFaultCode(fault); faultCode.setText(new QName(fault.getNamespace().getNamespaceURI(), localName, fault.getNamespace().getPrefix())); SOAPFaultReason faultReason = getAxiomFactory().createSOAPFaultReason(fault); if (locale != null) { addLangAttribute(locale, faultReason); } faultReason.setText(faultString); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
private void setFaultCode(MessageContext synCtx, SOAPFactory factory, SOAPFault fault, int soapVersion) { QName fault_code = null; if (faultCodeValue == null && faultCodeExpr == null) { handleException("A valid fault code QName value or expression is required", synCtx); } else if (faultCodeValue != null) { fault_code = faultCodeValue; } else { String codeStr = faultCodeExpr.stringValueOf(synCtx); fault_code = new QName(fault.getNamespace().getNamespaceURI(),codeStr); } SOAPFaultCode code = factory.createSOAPFaultCode(); switch (soapVersion) { case SOAP11: code.setText(fault_code); break; case SOAP12: SOAPFaultValue value = factory.createSOAPFaultValue(code); value.setText(fault_code); break; } fault.setCode(code); }
private SOAPFault addStandardFault(String localName, String faultString, Locale locale) { Assert.notNull(faultString, "No faultString given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode faultCode = getAxiomFactory().createSOAPFaultCode(fault); faultCode.setText(new QName(fault.getNamespace().getNamespaceURI(), localName, fault.getNamespace().getPrefix())); SOAPFaultReason faultReason = getAxiomFactory().createSOAPFaultReason(fault); if (locale != null) { addLangAttribute(locale, faultReason); } faultReason.setText(faultString); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
private SOAPFault addStandardFault(String localName, String faultString, Locale locale) { Assert.notNull(faultString, "No faultString given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode faultCode = getAxiomFactory().createSOAPFaultCode(fault); faultCode.setText(QNameUtils.createQName(fault.getNamespace().getNamespaceURI(), localName, fault.getNamespace().getPrefix())); SOAPFaultReason faultReason = getAxiomFactory().createSOAPFaultReason(fault); if (locale != null) { addLangAttribute(locale, faultReason); } faultReason.setText(faultString); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
fault.getNamespace().getNamespaceURI() : uri;
fault.getNamespace().getNamespaceURI() : uri;
faultCode.setText(new QName(fault.getNamespace().getNamespaceURI(), code)); } else { SOAPFaultValue value = factory.createSOAPFaultValue(faultCode); value.setText(new QName(fault.getNamespace().getNamespaceURI(), code));
private SOAPFault addStandardFault(String localName, String faultStringOrReason, Locale locale) { Assert.notNull(faultStringOrReason, "No faultStringOrReason given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode code = getAxiomFactory().createSOAPFaultCode(fault); SOAPFaultValue value = getAxiomFactory().createSOAPFaultValue(code); value.setText(fault.getNamespace().getPrefix() + ":" + localName); SOAPFaultReason reason = getAxiomFactory().createSOAPFaultReason(fault); SOAPFaultText text = getAxiomFactory().createSOAPFaultText(reason); if (locale != null) { text.setLang(AxiomUtils.toLanguage(locale)); } text.setText(faultStringOrReason); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
faultCode.setText(new QName(fault.getNamespace().getNamespaceURI(), code)); } else { SOAPFaultValue value = factory.createSOAPFaultValue(faultCode); value.setText(new QName(fault.getNamespace().getNamespaceURI(), code));
private SOAPFault addStandardFault(String localName, String faultStringOrReason, Locale locale) { Assert.notNull(faultStringOrReason, "No faultStringOrReason given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode code = getAxiomFactory().createSOAPFaultCode(fault); SOAPFaultValue value = getAxiomFactory().createSOAPFaultValue(code); value.setText(fault.getNamespace().getPrefix() + ":" + localName); SOAPFaultReason reason = getAxiomFactory().createSOAPFaultReason(fault); SOAPFaultText text = getAxiomFactory().createSOAPFaultText(reason); if (locale != null) { text.setLang(AxiomUtils.toLanguage(locale)); } text.setText(faultStringOrReason); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
private SOAPFault addStandardFault(String localName, String faultStringOrReason, Locale locale) { Assert.notNull(faultStringOrReason, "No faultStringOrReason given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode code = getAxiomFactory().createSOAPFaultCode(fault); SOAPFaultValue value = getAxiomFactory().createSOAPFaultValue(code); value.setText(fault.getNamespace().getPrefix() + ":" + localName); SOAPFaultReason reason = getAxiomFactory().createSOAPFaultReason(fault); SOAPFaultText text = getAxiomFactory().createSOAPFaultText(reason); if (locale != null) { text.setLang(AxiomUtils.toLanguage(locale)); } text.setText(faultStringOrReason); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
private SOAPFault addStandardFault(String localName, String faultStringOrReason, Locale locale) { Assert.notNull(faultStringOrReason, "No faultStringOrReason given"); try { AxiomUtils.removeContents(getAxiomBody()); SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody()); SOAPFaultCode code = getAxiomFactory().createSOAPFaultCode(fault); SOAPFaultValue value = getAxiomFactory().createSOAPFaultValue(code); value.setText(fault.getNamespace().getPrefix() + ":" + localName); SOAPFaultReason reason = getAxiomFactory().createSOAPFaultReason(fault); SOAPFaultText text = getAxiomFactory().createSOAPFaultText(reason); if (locale != null) { text.setLang(AxiomUtils.toLanguage(locale)); } text.setText(faultStringOrReason); return fault; } catch (SOAPProcessingException ex) { throw new AxiomSoapFaultException(ex); } }
final int SOAP_12 = 2; if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI .equals(fault.getNamespace().getNamespaceURI())) { fac = OMAbstractFactory.getSOAP11Factory(); soapVersion = SOAP_11;