SWS-1006 - Make AxiomSoapHeader compatible with Axiom 1.3
AxiomSoapHeaderElementIterator expects an Iterator<SOAPHeaderBlock> as input. However, it is also used together with getChildrenWithName, which (since it's defined by OMContainer), will actually return an Iterator<OMElement> in Axiom 1.3. Therefore it should use Iterator<? extends OMElement>.
This commit is contained in:
committed by
Greg Turnquist
parent
10de93f4b8
commit
a3517d4da1
@@ -114,9 +114,9 @@ abstract class AxiomSoapHeader extends AxiomSoapElement implements SoapHeader {
|
||||
|
||||
protected class AxiomSoapHeaderElementIterator implements Iterator<SoapHeaderElement> {
|
||||
|
||||
private final Iterator<SOAPHeaderBlock> axiomIterator;
|
||||
private final Iterator<? extends OMElement> axiomIterator;
|
||||
|
||||
protected AxiomSoapHeaderElementIterator(Iterator<SOAPHeaderBlock> axiomIterator) {
|
||||
protected AxiomSoapHeaderElementIterator(Iterator<? extends OMElement> axiomIterator) {
|
||||
this.axiomIterator = axiomIterator;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ abstract class AxiomSoapHeader extends AxiomSoapElement implements SoapHeader {
|
||||
@Override
|
||||
public SoapHeaderElement next() {
|
||||
try {
|
||||
SOAPHeaderBlock axiomHeaderBlock = axiomIterator.next();
|
||||
OMElement axiomHeaderBlock = axiomIterator.next();
|
||||
return new AxiomSoapHeaderElement(axiomHeaderBlock, getAxiomFactory());
|
||||
}
|
||||
catch (OMException ex) {
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.ws.soap.axiom;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
|
||||
import org.apache.axiom.om.OMElement;
|
||||
import org.apache.axiom.om.OMException;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
import org.apache.axiom.soap.SOAPHeaderBlock;
|
||||
@@ -27,7 +28,7 @@ import org.springframework.ws.soap.SoapHeaderElement;
|
||||
/** Axiom-specific version of {@code org.springframework.ws.soap.SoapHeaderHeaderElement}. */
|
||||
class AxiomSoapHeaderElement extends AxiomSoapElement implements SoapHeaderElement {
|
||||
|
||||
public AxiomSoapHeaderElement(SOAPHeaderBlock axiomHeaderBlock, SOAPFactory axiomFactory) {
|
||||
public AxiomSoapHeaderElement(OMElement axiomHeaderBlock, SOAPFactory axiomFactory) {
|
||||
super(axiomHeaderBlock, axiomFactory);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user