Skip to content

Package: StaxBridge

StaxBridge

nameinstructionbranchcomplexitylinemethod
StaxBridge(SOAPPartImpl)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
bridgeEnvelopeAndHeaders()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
bridgePayload()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /*
2: * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Distribution License v. 1.0, which is available at
6: * http://www.eclipse.org/org/documents/edl-v10.php.
7: *
8: * SPDX-License-Identifier: BSD-3-Clause
9: */
10:
11: package com.sun.xml.messaging.saaj.soap;
12:
13: import com.sun.xml.messaging.saaj.util.stax.SaajStaxWriter;
14:
15: import javax.xml.namespace.QName;
16: import jakarta.xml.soap.SOAPException;
17: import javax.xml.stream.XMLStreamException;
18: import javax.xml.stream.XMLStreamReader;
19: import org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
20:
21:
22: /**
23: * StaxBridge builds Envelope using a XMLStreamReaderToXMLStreamWriter
24: *
25: * @author shih-chang.chen@oracle.com
26: */
27: public abstract class StaxBridge {
28:         protected SaajStaxWriter saajWriter;
29:         protected XMLStreamReaderToXMLStreamWriter readerToWriter;
30:         protected XMLStreamReaderToXMLStreamWriter.Breakpoint breakpoint;
31:         
32:         
33:         public StaxBridge(SOAPPartImpl soapPart) throws SOAPException {
34:                 readerToWriter = new XMLStreamReaderToXMLStreamWriter();
35:                 saajWriter = new SaajStaxWriter(soapPart.message, soapPart.getSOAPNamespace());
36:         }
37:
38:         public void bridgeEnvelopeAndHeaders() throws XMLStreamException {
39:                 readerToWriter.bridge(breakpoint);
40:         }
41:         
42:         public void bridgePayload() throws XMLStreamException {
43:                 readerToWriter.bridge(breakpoint);
44:         }
45:
46: abstract public XMLStreamReader getPayloadReader();
47:
48: abstract public QName getPayloadQName();
49:
50: abstract public String getPayloadAttributeValue(String attName) ;
51:
52: abstract public String getPayloadAttributeValue(QName attName) ;
53: }