< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 129,139 **** FaultImpl flt = (FaultImpl) findFault(); fault = flt; } protected SOAPElement findFault() { ! Iterator eachChild = getChildElementNodes(); while (eachChild.hasNext()) { SOAPElement child = (SOAPElement) eachChild.next(); if (isFault(child)) { return child; } --- 129,139 ---- FaultImpl flt = (FaultImpl) findFault(); fault = flt; } protected SOAPElement findFault() { ! Iterator<Node> eachChild = getChildElementNodes(); while (eachChild.hasNext()) { SOAPElement child = (SOAPElement) eachChild.next(); if (isFault(child)) { return child; }
*** 245,255 **** // This copies the whole tree which could be very big so it's slow. // However, it does have the advantage of actually working. org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true); // Adding replacingNode at the last of the children list of body addNode(replacingNode); ! Iterator i = getChildElements(NameImpl.copyElementName(rootElement)); // Return the child element with the required name which is at the // end of the list while(i.hasNext()) newBodyElement = (SOAPBodyElement) i.next(); --- 245,255 ---- // This copies the whole tree which could be very big so it's slow. // However, it does have the advantage of actually working. org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true); // Adding replacingNode at the last of the children list of body addNode(replacingNode); ! Iterator<Node> i = getChildElements(NameImpl.copyElementName(rootElement)); // Return the child element with the required name which is at the // end of the list while(i.hasNext()) newBodyElement = (SOAPBodyElement) i.next();
*** 282,292 **** + newName.getLocalPart()); } public Document extractContentAsDocument() throws SOAPException { ! Iterator eachChild = getChildElements(); javax.xml.soap.Node firstBodyElement = null; while (eachChild.hasNext() && !(firstBodyElement instanceof SOAPElement)) firstBodyElement = (javax.xml.soap.Node) eachChild.next(); --- 282,292 ---- + newName.getLocalPart()); } public Document extractContentAsDocument() throws SOAPException { ! Iterator<Node> eachChild = getChildElements(); javax.xml.soap.Node firstBodyElement = null; while (eachChild.hasNext() && !(firstBodyElement instanceof SOAPElement)) firstBodyElement = (javax.xml.soap.Node) eachChild.next();
*** 312,323 **** throw new SOAPException("Cannot extract Document from body"); } Document document = null; try { ! DocumentBuilderFactory factory = ! new com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); Element rootElement = (Element) document.importNode( --- 312,322 ---- throw new SOAPException("Cannot extract Document from body"); } Document document = null; try { ! DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); Element rootElement = (Element) document.importNode(
< prev index next >