--- old/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java 2017-06-16 17:01:18.044660474 +0100 +++ new/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java 2017-06-16 17:01:17.988660472 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, 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 @@ -42,38 +42,39 @@ * @author shih-chang.chen@oracle.com */ public class StaxLazySourceBridge extends StaxBridge { - private LazyEnvelopeSource lazySource; + private LazyEnvelopeSource lazySource; - public StaxLazySourceBridge(LazyEnvelopeSource src, SOAPPartImpl soapPart) throws SOAPException { - super(soapPart); - lazySource = src; - final String soapEnvNS = soapPart.getSOAPNamespace(); - try { - breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(src.readToBodyStarTag(), saajWriter) { - public boolean proceedAfterStartElement() { - if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ - return false; - } else - return true; - } - }; - } catch (XMLStreamException e) { - throw new SOAPException(e); + public StaxLazySourceBridge(LazyEnvelopeSource src, SOAPPartImpl soapPart) throws SOAPException { + super(soapPart); + lazySource = src; + final String soapEnvNS = soapPart.getSOAPNamespace(); + try { + breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(src.readToBodyStarTag(), saajWriter) { + @Override + public boolean proceedAfterStartElement() { + if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ + return false; + } else + return true; } + }; + } catch (XMLStreamException e) { + throw new SOAPException(e); } + } - @Override + @Override public XMLStreamReader getPayloadReader() { return lazySource.readPayload(); // throw new UnsupportedOperationException(); } - @Override + @Override public QName getPayloadQName() { return lazySource.getPayloadQName(); } - @Override + @Override public String getPayloadAttributeValue(String attName) { if (lazySource.isPayloadStreamReader()) { XMLStreamReader reader = lazySource.readPayload(); @@ -84,7 +85,7 @@ return null; } - @Override + @Override public String getPayloadAttributeValue(QName attName) { if (lazySource.isPayloadStreamReader()) { XMLStreamReader reader = lazySource.readPayload(); @@ -95,12 +96,13 @@ return null; } - public void bridgePayload() throws XMLStreamException { - //Assuming out is at Body - writePayloadTo(saajWriter); - } + @Override + public void bridgePayload() throws XMLStreamException { + //Assuming out is at Body + writePayloadTo(saajWriter); + } - public void writePayloadTo(XMLStreamWriter writer) throws XMLStreamException { + public void writePayloadTo(XMLStreamWriter writer) throws XMLStreamException { lazySource.writePayloadTo(writer); } }