@Path("getValues/") @GET @Produces( MediaType.APPLICATION_JSON) public DetailInterface getClientDetail() { DetailInterface di = new DetailImpl() return di; }
public DetailEntry addDetailEntry(Name name) throws SOAPException { DetailEntryImpl detailEntry = new DetailEntryImpl(name); addChildElement(detailEntry); return detailEntry; }
@Override public SOAPElement addChildElement(SOAPElement child) throws SOAPException { if (!(child instanceof DetailEntry)) child = convertToDetailEntry((SOAPElementImpl)child); return super.addChildElement(child); }
/** Converts the given element to a Detail. */ DetailImpl(SOAPElementImpl element) { super(element.getElementName()); // altough detail schema does not define attributes, copy them for completeness DOMUtils.copyAttributes(this, element); try { NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if (node instanceof SOAPElement) addChildElement((SOAPElement)node); else appendChild(node); } } catch (SOAPException e) { throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CREATE_FAULT_DETAIL"), e); } }
public Iterator getDetailEntries() { List<DetailEntry> list = new ArrayList<DetailEntry>(); NodeList nodeList = getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { org.w3c.dom.Node node = nodeList.item(i); if (node instanceof DetailEntry) list.add((DetailEntry)node); } return list.iterator(); }
@Override public Detail createDetail() throws SOAPException { assertEnvNamespace(); return SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(envNamespace) ? new DetailImpl() : new DetailImpl(SOAPConstants.SOAP_ENV_PREFIX, envNamespace); }
public DetailEntry addDetailEntry(QName qname) throws SOAPException { DetailEntryImpl detailEntry = new DetailEntryImpl(qname); addChildElement(detailEntry); return detailEntry; }
private SOAPFaultElement convertToFaultElement(SOAPElementImpl element) { element.detachNode(); QName elementName = element.getElementQName(); SOAPFaultElement faultElement; if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()) ? Constants.SOAP11_DETAIL.equals(elementName) : Constants.SOAP12_DETAIL.equals(elementName)) faultElement = new DetailImpl(element); else faultElement = new SOAPFaultElementImpl(element); log.trace("convertToFaultElement : " + faultElement); return faultElement; }
/** 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; }