/** * Gets the Subcodes for this SOAPFault as an iterator over QNames. * * @return an Iterator that accesses a sequence of QNames. This Iterator should not support the * optional remove method. The order in which the Subcodes are returned reflects the * hierarchy of Subcodes present in the fault from top to bottom. * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Subcode. */ public Iterator getFaultSubcodes() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { throw new UnsupportedOperationException(); } ArrayList faultSubcodes = new ArrayList(); SOAPFaultSubCode subCodeElement = this.omTarget.getCode().getSubCode(); while (subCodeElement != null) { faultSubcodes.add(subCodeElement.getValueAsQName()); subCodeElement = subCodeElement.getSubCode(); } return faultSubcodes.iterator(); }
@Override public Iterator<QName> getFaultSubcodes() { List<QName> subcodes = new ArrayList<QName>(); SOAPFaultSubCode subcode = getAxiomFault().getCode().getSubCode(); while (subcode != null) { subcodes.add(subcode.getValue().getTextAsQName()); subcode = subcode.getSubCode(); } return subcodes.iterator(); }
/** * Removes any Subcodes that may be contained by this SOAPFault. Subsequent calls to * getFaultSubcodes will return an empty iterator until a call to appendFaultSubcode is made. * * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Subcode. */ public void removeAllFaultSubcodes() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { throw new UnsupportedOperationException(); } else { omTarget.getCode().getSubCode().detach(); } }
SOAPFaultValue saopFaultValue = sf.createSOAPFaultValue(fault.getCode()); saopFaultValue.setText(faultSubCodeQName); soapFaultSubCode.setValue(saopFaultValue); fault.getCode().setSubCode(soapFaultSubCode);
private SOAPFaultSubCode getLastSubCode(SOAPFaultSubCode firstSubCodeElement) { SOAPFaultSubCode soapFaultSubCode = firstSubCodeElement.getSubCode(); if (soapFaultSubCode != null) { return getLastSubCode(soapFaultSubCode); } return firstSubCodeElement; }
if ( subCode != null && !"".equals( subCode.trim() ) ) { SOAPFaultSubCode sc = factory.createSOAPFaultSubCode( code ); writer.writeStartElement( ns, sc.getLocalName() ); writeAttributes( writer, sc ); SOAPFaultValue scVal = factory.createSOAPFaultValue( sc );
SOAPFaultValue saopFaultValue = sf.createSOAPFaultValue(fault.getCode()); saopFaultValue.setText(faultSubCodeQName); soapFaultSubCode.setValue(saopFaultValue); fault.getCode().setSubCode(soapFaultSubCode);
private SOAPFaultSubCode getLastSubCode(SOAPFaultSubCode firstSubCodeElement) { SOAPFaultSubCode soapFaultSubCode = firstSubCodeElement.getSubCode(); if (soapFaultSubCode != null) { return getLastSubCode(soapFaultSubCode); } return firstSubCodeElement; }
faultSubCodes = new ArrayList<QName>(); while (subCode != null) { faultSubCodes.add(subCode.getValueAsQName()); subCode = subCode.getSubCode();
public Iterator<QName> getFaultSubcodes() { List<QName> subcodes = new ArrayList<QName>(); SOAPFaultSubCode subcode = getAxiomFault().getCode().getSubCode(); while (subcode != null) { subcodes.add(subcode.getValue().getTextAsQName()); subcode = subcode.getSubCode(); } return subcodes.iterator(); }
QName qNameSubCode = new QName("http://wso2.org/passivests", subCode, "sts"); soapFaultValueSub.setText(qNameSubCode); soapFaultSubCode.setValue(soapFaultValueSub); soapFaultCode.setSubCode(soapFaultSubCode); message.getBody().getFault().setCode(soapFaultCode);
@Override public void addFaultSubcode(QName subcode) { SOAPFaultCode faultCode = getAxiomFault().getCode(); SOAPFaultSubCode faultSubCode = null; if (faultCode.getSubCode() == null) { faultSubCode = getAxiomFactory().createSOAPFaultSubCode(faultCode); } else { faultSubCode = faultCode.getSubCode(); while (true) { if (faultSubCode.getSubCode() != null) { faultSubCode = faultSubCode.getSubCode(); } else { faultSubCode = getAxiomFactory().createSOAPFaultSubCode(faultSubCode); break; } } } SOAPFaultValue faultValue = getAxiomFactory().createSOAPFaultValue(faultSubCode); setValueText(subcode, faultValue); }
/** * Removes any Subcodes that may be contained by this SOAPFault. Subsequent calls to * getFaultSubcodes will return an empty iterator until a call to appendFaultSubcode is made. * * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Subcode. */ public void removeAllFaultSubcodes() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { omTarget.getCode().getSubCode().detach(); } }
/** * Gets the Subcodes for this SOAPFault as an iterator over QNames. * * @return an Iterator that accesses a sequence of QNames. This Iterator should not support the * optional remove method. The order in which the Subcodes are returned reflects the * hierarchy of Subcodes present in the fault from top to bottom. * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Subcode. */ public Iterator getFaultSubcodes() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } ArrayList faultSubcodes = new ArrayList(); SOAPFaultSubCode subCodeElement = this.omTarget.getCode().getSubCode(); while (subCodeElement != null) { faultSubcodes.add(subCodeElement.getValueAsQName()); subCodeElement = subCodeElement.getSubCode(); } return faultSubcodes.iterator(); }
@Override public Iterator<QName> getFaultSubcodes() { List<QName> subcodes = new ArrayList<QName>(); SOAPFaultSubCode subcode = getAxiomFault().getCode().getSubCode(); while (subcode != null) { subcodes.add(subcode.getValue().getTextAsQName()); subcode = subcode.getSubCode(); } return subcodes.iterator(); }
QName qNameSubCode = new QName("http://wso2.org/passivests", subCode, "sts"); soapFaultValueSub.setText(qNameSubCode); soapFaultSubCode.setValue(soapFaultValueSub); soapFaultCode.setSubCode(soapFaultSubCode); message.getBody().getFault().setCode(soapFaultCode);
public void addFaultSubcode(QName subcode) { SOAPFaultCode faultCode = getAxiomFault().getCode(); SOAPFaultSubCode faultSubCode = null; if (faultCode.getSubCode() == null) { faultSubCode = getAxiomFactory().createSOAPFaultSubCode(faultCode); } else { faultSubCode = faultCode.getSubCode(); while (true) { if (faultSubCode.getSubCode() != null) { faultSubCode = faultSubCode.getSubCode(); } else { faultSubCode = getAxiomFactory().createSOAPFaultSubCode(faultSubCode); break; } } } SOAPFaultValue faultValue = getAxiomFactory().createSOAPFaultValue(faultSubCode); setValueText(subcode, faultValue); }
faultSubCodes = new ArrayList<QName>(); while (subCode != null) { faultSubCodes.add(subCode.getValueAsQName()); subCode = subCode.getSubCode();
@Override public Iterator<QName> getFaultSubcodes() { List<QName> subcodes = new ArrayList<QName>(); SOAPFaultSubCode subcode = getAxiomFault().getCode().getSubCode(); while (subcode != null) { subcodes.add(subcode.getValue().getTextAsQName()); subcode = subcode.getSubCode(); } return subcodes.iterator(); }