/** * Set or replace the text value */ public static void setText(Node node, String val) { Node chld = DOMUtils.getChild(node, Node.TEXT_NODE); if (chld == null) { Node textN = node.getOwnerDocument().createTextNode(val); node.appendChild(textN); return; } // change the value chld.setNodeValue(val); }
/** * Set or replace the text value */ public static void setText(Node node, String val) { Node chld = DOMUtils.getChild(node, Node.TEXT_NODE); if (chld == null) { Node textN = node.getOwnerDocument().createTextNode(val); node.appendChild(textN); return; } // change the value chld.setNodeValue(val); }
/** * Set or replace the text value */ public static void setText(Node node, String val) { Node chld = DOMUtils.getChild(node, Node.TEXT_NODE); if (chld == null) { Node textN = node.getOwnerDocument().createTextNode(val); node.appendChild(textN); return; } // change the value chld.setNodeValue(val); }
/** * Set or replace the text value */ public static void setText(Node node, String val) { Node chld = DOMUtils.getChild(node, Node.TEXT_NODE); if (chld == null) { Node textN = node.getOwnerDocument().createTextNode(val); node.appendChild(textN); return; } // change the value chld.setNodeValue(val); }
/** * Set or replace the text value */ public static void setText(Node node, String val) { Node chld = DOMUtils.getChild(node, Node.TEXT_NODE); if (chld == null) { Node textN = node.getOwnerDocument().createTextNode(val); node.appendChild(textN); return; } // change the value chld.setNodeValue(val); }
/** * Find the first direct child with a given attribute. * * @param parent * @param elemName name of the element, or null for any * @param attName attribute we're looking for * @param attVal attribute value or null if we just want any */ public static Element findChildWithAtt(Node parent, String elemName, String attName, String attVal) { Element child = (Element)getChild(parent, Node.ELEMENT_NODE); if (attVal == null) { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && DOMUtils.getAttribute(child, attName) != null) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } else { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && !attVal.equals(DOMUtils.getAttribute(child, attName))) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } return child; }
/** * Find the first direct child with a given attribute. * * @param parent * @param elemName name of the element, or null for any * @param attName attribute we're looking for * @param attVal attribute value or null if we just want any */ public static Element findChildWithAtt(Node parent, String elemName, String attName, String attVal) { Element child = (Element)getChild(parent, Node.ELEMENT_NODE); if (attVal == null) { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && DOMUtils.getAttribute(child, attName) != null) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } else { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && !attVal.equals(DOMUtils.getAttribute(child, attName))) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } return child; }
/** * Find the first direct child with a given attribute. * * @param parent * @param elemName name of the element, or null for any * @param attName attribute we're looking for * @param attVal attribute value or null if we just want any */ public static Element findChildWithAtt(Node parent, String elemName, String attName, String attVal) { Element child = (Element)getChild(parent, Node.ELEMENT_NODE); if (attVal == null) { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && DOMUtils.getAttribute(child, attName) != null) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } else { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && !attVal.equals(DOMUtils.getAttribute(child, attName))) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } return child; }
private void decodeReferenceParameters(Set<Element> referenceParameterHeaders, AddressingProperties maps, Unmarshaller unmarshaller) throws JAXBException { EndpointReferenceType toEpr = maps.getToEndpointReference(); if (null != toEpr) { for (Element e : referenceParameterHeaders) { if (DOMUtils.getChild(e, Node.ELEMENT_NODE) == null) { JAXBElement<String> el = unmarshaller.unmarshal(e, String.class); ContextUtils.applyReferenceParam(toEpr, el); } else { ContextUtils.applyReferenceParam(toEpr, e); } } } }
/** * Find the first direct child with a given attribute. * * @param parent * @param elemName name of the element, or null for any * @param attName attribute we're looking for * @param attVal attribute value or null if we just want any */ public static Element findChildWithAtt(Node parent, String elemName, String attName, String attVal) { Element child = (Element)getChild(parent, Node.ELEMENT_NODE); if (attVal == null) { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && DOMUtils.getAttribute(child, attName) != null) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } else { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && !attVal.equals(DOMUtils.getAttribute(child, attName))) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } return child; }
public void handleResponse(Response<DOMSource> response) { try { DOMSource reply = response.get(); replyBuffer = DOMUtils.getChild(reply.getNode(), Node.ELEMENT_NODE).getTextContent(); } catch (Exception e) { //e.printStackTrace(); } }
/** * Find the first direct child with a given attribute. * * @param parent * @param elemName name of the element, or null for any * @param attName attribute we're looking for * @param attVal attribute value or null if we just want any */ public static Element findChildWithAtt(Node parent, String elemName, String attName, String attVal) { Element child = (Element)getChild(parent, Node.ELEMENT_NODE); if (attVal == null) { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && DOMUtils.getAttribute(child, attName) != null) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } else { while (child != null && (elemName == null || elemName.equals(child.getNodeName())) && !attVal.equals(DOMUtils.getAttribute(child, attName))) { child = (Element)getNext(child, elemName, Node.ELEMENT_NODE); } } return child; }
private void decodeReferenceParameters(Set<Element> referenceParameterHeaders, AddressingProperties maps, Unmarshaller unmarshaller) throws JAXBException { EndpointReferenceType toEpr = maps.getToEndpointReference(); if (null != toEpr) { for (Element e : referenceParameterHeaders) { if (DOMUtils.getChild(e, Node.ELEMENT_NODE) == null) { JAXBElement<String> el = unmarshaller.unmarshal(e, String.class); ContextUtils.applyReferenceParam(toEpr, el); } else { ContextUtils.applyReferenceParam(toEpr, e); } } } }
Node firstChild = DOMUtils.getChild(node, "jaxws:bindings"); if (firstChild == null && cloneNode.getNodeName().indexOf("bindings") == -1) { wsdlNode.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
Node node = DOMUtils.getChild(docImport, null); if (node != null && !"definitions".equals(node.getLocalName())) { Message msg = new Message("NOT_A_WSDLFILE", LOG, systemId);
Node node = DOMUtils.getChild(docImport, null); if (node != null && !"definitions".equals(node.getLocalName())) { Message msg = new Message("NOT_A_WSDLFILE", LOG, systemId);
protected void processFaultDetail(Fault fault, Message msg) { if (fault.getDetail() == null) { return; } Element exDetail = (Element) DOMUtils.getChild(fault.getDetail(), Node.ELEMENT_NODE); if (exDetail == null) { return; } QName qname = new QName(exDetail.getNamespaceURI(), exDetail .getLocalName()); faultWanted = null; BindingOperationInfo boi = msg.getExchange().get( BindingOperationInfo.class); if (boi.isUnwrapped()) { boi = boi.getWrappedOperation(); } for (BindingFaultInfo bfi : boi.getFaults()) { for (MessagePartInfo mpi : bfi.getFaultInfo().getMessageParts()) { if (qname.equals(mpi.getConcreteName())) { faultWanted = bfi; msg.put(BindingFaultInfo.class, faultWanted); break; } } if (faultWanted != null) { break; } } }
StaxUtils.writeNode(DOMUtils.getChild(f.getDetail(), Node.ELEMENT_NODE), writer, false); writer.writeEndElement();
} else if (isPackageElement(child)) { jaxwsBinding.setPackage(getPackageName(child)); Node docChild = DOMUtils.getChild(child, Node.ELEMENT_NODE); if (docChild != null && this.isJAXWSClassDoc(docChild)) { jaxwsBinding.setPackageJavaDoc(StringEscapeUtils.escapeHtml4(DOMUtils.getContent(docChild))); Node docChild = DOMUtils.getChild(child, Node.ELEMENT_NODE); String clzName = childElement.getAttribute("name"); String javadoc = ""; Node docChild = DOMUtils.getChild(child, Node.ELEMENT_NODE);
StaxUtils.writeNode(DOMUtils.getChild(f.getDetail(), Node.ELEMENT_NODE), writer, false); writer.writeEndElement();