### Question:
CustomizationParser { protected void copyAllJaxbDeclarations(final Node schemaNode, final Element jaxwsBindingNode) { if (isSchemaElement(schemaNode)) { appendJaxbVersion((Element)schemaNode); } Node[] embededNodes = getAnnotationNodes(schemaNode); Node annotationNode = embededNodes[0]; Node appinfoNode = embededNodes[1]; for (Node childNode = jaxwsBindingNode.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) { if (isSchemaElement(schemaNode)) { copyJaxbAttributes(childNode, (Element)schemaNode); } if (!(childNode instanceof Element)) { continue; } Element childEl = (Element)childNode; if (isJaxbBindings(childNode) && isJaxbBindingsElement(childEl)) { NodeList nlist = nodeSelector.queryNodes(schemaNode, childEl.getAttribute("node")); for (int i = 0; i < nlist.getLength(); i++) { Node node = nlist.item(i); copyAllJaxbDeclarations(node, childEl); } } else { Element cloneNode = (Element)ProcessorUtil.cloneNode(schemaNode.getOwnerDocument(), childEl, true); NamedNodeMap atts = cloneNode.getAttributes(); for (int x = 0; x < atts.getLength(); x++) { Attr attr = (Attr)atts.item(x); if (ToolConstants.NS_JAXB_BINDINGS.equals(attr.getNamespaceURI())) { cloneNode.removeAttributeNode(attr); atts = cloneNode.getAttributes(); x = -1; } } appinfoNode.appendChild(cloneNode); } } if (schemaNode.getFirstChild() != null) { schemaNode.insertBefore(annotationNode, schemaNode.getFirstChild()); } else { schemaNode.appendChild(annotationNode); } } CustomizationParser(); Element getHandlerChains(); void parse(ToolContext pe); Element getTargetNode(String uri); Node getWSDLNode(); Map<String, Element> getCustomizedWSDLElements(); List<InputSource> getJaxbBindings(); static JAXWSBinding mergeJawsBinding(JAXWSBinding binding1, JAXWSBinding binding2);  }### Answer:
@Test public void testCopyAllJaxbDeclarations() throws Exception { Element schema = getDocumentElement("resources/test.xsd"); Element binding = getDocumentElement("resources/embeded_jaxb.xjb"); String checkingPoint = " assertNull(selector.queryNode(schema, checkingPoint)); Node jaxwsBindingNode = selector.queryNode(binding, " Node schemaNode = selector.queryNode(schema, " parser.copyAllJaxbDeclarations(schemaNode, (Element)jaxwsBindingNode); File file = new File(output, "custom_test.xsd"); StaxUtils.writeTo(schemaNode, new FileOutputStream(file)); Document testNode = StaxUtils.read(file); Node result = selector.queryNode(testNode, checkingPoint); assertNotNull(result); }