src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
32 import com.sun.xml.internal.ws.api.SOAPVersion; 32 import com.sun.xml.internal.ws.api.SOAPVersion;
33 import com.sun.xml.internal.ws.api.addressing.AddressingVersion; 33 import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
34 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; 34 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
35 import com.sun.xml.internal.ws.api.message.Header; 35 import com.sun.xml.internal.ws.api.message.Header;
36 import com.sun.xml.internal.ws.message.AbstractHeaderImpl; 36 import com.sun.xml.internal.ws.message.AbstractHeaderImpl;
37 import com.sun.xml.internal.ws.util.xml.XmlUtil;
37 import org.w3c.dom.Node; 38 import org.w3c.dom.Node;
38 import org.xml.sax.ContentHandler; 39 import org.xml.sax.ContentHandler;
39 import org.xml.sax.ErrorHandler; 40 import org.xml.sax.ErrorHandler;
40 import org.xml.sax.SAXException; 41 import org.xml.sax.SAXException;
41 42
191 public void writeTo(SOAPMessage saaj) throws SOAPException { 192 public void writeTo(SOAPMessage saaj) throws SOAPException {
192 try { 193 try {
193 // TODO what about in-scope namespaces 194 // TODO what about in-scope namespaces
194 // Not very efficient consider implementing a stream buffer 195 // Not very efficient consider implementing a stream buffer
195 // processor that produces a DOM node from the buffer. 196 // processor that produces a DOM node from the buffer.
196 TransformerFactory tf = TransformerFactory.newInstance(); 197 TransformerFactory tf = XmlUtil.newTransformerFactory();
197 Transformer t = tf.newTransformer(); 198 Transformer t = tf.newTransformer();
198 XMLStreamBufferSource source = new XMLStreamBufferSource(_mark); 199 XMLStreamBufferSource source = new XMLStreamBufferSource(_mark);
199 DOMResult result = new DOMResult(); 200 DOMResult result = new DOMResult();
200 t.transform(source, result); 201 t.transform(source, result);
201 Node d = result.getNode(); 202 Node d = result.getNode();

mercurial