private static SOAPFactory newSOAPFactory(final String protocol) { try { return new SOAPFactoryImpl(protocol); } catch (final SOAPException ignore) { return null; } // TODO: use standard SOAP API to create objects //return MessageFactory.newInstance() }
@Override protected SOAPFactory newSOAPFactory(String protocol) throws SOAPException { return new SOAPFactoryImpl(protocol); }
public SOAPBodyElement addDocument(Document doc) throws SOAPException { Element rootElement = doc.getDocumentElement(); SOAPFactoryImpl soapFactory = new SOAPFactoryImpl(); SOAPElement soapElement = soapFactory.createElement(rootElement); return (SOAPBodyElement)addChildElement(soapElement); }
try SOAPFactoryImpl soapFactory = new SOAPFactoryImpl(); for (Node node = docFragment.getFirstChild(); node != null; node = node.getNextSibling())
private static SOAPBodyElementDoc convertToBodyElement(Node node) throws DOMException { if (!(node instanceof SOAPElementImpl) && (node instanceof Element)) { try { SOAPFactoryImpl soapFactory = new SOAPFactoryImpl(); node = (SOAPElementImpl)soapFactory.createElement((Element)node); } catch (SOAPException ex) { throw new DOMException(DOMException.INVALID_STATE_ERR, "Could not convert Element to a SOAPElement"); } } if (!(node instanceof SOAPElementImpl)) throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "SOAPELEMENT_EXPECTED")); SOAPElementImpl element = (SOAPElementImpl)node; element.detachNode(); return new SOAPBodyElementDoc(element); }
soapElement = (SOAPElementImpl) new SOAPFactoryImpl().createElement((Element) (soapElement.domNode)); DOMUtils.setOwnerDocument(oldDoc);
container.setPrefix(domElement.getPrefix()); SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
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; }
retNode = new SOAPFactoryImpl().createElement((Element)node);