private SOAPElement addUnqualifiedFaultElement(String localName) throws SOAPException { log.trace("addUnqualifiedFaultElement(" + localName + ")"); return addChildElement(new SOAPFaultElementImpl(localName)); }
private SOAPElement addQualifiedFaultElement(String localName) throws SOAPException { log.trace("addQualifiedFaultElement(" + localName + ")"); return addChildElement(new SOAPFaultElementImpl(localName, getPrefix(), getNamespaceURI())); } }
private Detail extractDetail(final QName detailQName) { SOAPElement obj = getChildElement(this, detailQName); Detail detail = null; if (obj instanceof Detail) { detail = (Detail)obj; } else if(obj instanceof SOAPElementImpl) { try { SOAPElementImpl soapEl = (SOAPElementImpl)obj; SOAPFactoryImpl factory = new SOAPFactoryImpl(); detail = (Detail)addChildElement(factory.createDetail()); Iterator<Element> childIt = DOMUtils.getChildElements(soapEl); while (childIt.hasNext()) { Element domElement = childIt.next(); SOAPElement detailEntry = new DetailEntryImpl(factory.createElement(domElement, true)); detail.addChildElement(detailEntry); } } catch (SOAPException e) { throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CREATE_FAULT_DETAIL", e.getMessage())); } } return detail; }
/** Creates an optional Detail object and sets it as the Detail object for this SOAPFault object. */ public Detail addDetail() throws SOAPException { if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI())) { if (detail == null) findSoap11DetailElement(); if (detail != null) throw new SOAPException(BundleUtils.getMessage(bundle, "ALREADY_CONTAINS_DETAIL")); detail = new DetailImpl(); } else { if (detail == null) findSoap12DetailElement(); if (detail != null) throw new SOAPException(BundleUtils.getMessage(bundle, "ALREADY_CONTAINS_DETAIL")); detail = new DetailImpl(getPrefix(), getNamespaceURI()); } detail = (Detail)addChildElement(detail); return detail; }