diff --git a/Jenkinsfile b/Jenkinsfile index 29af2f95..4fc4fec5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,12 +22,26 @@ pipeline { ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') } steps { - sh "PROFILE=distribute,convergence ci/test.sh" + sh "PROFILE=distribute,convergence,testing ci/test.sh" } } stage("Test other configurations") { parallel { + stage("Test: Axiom 1.3)") { + agent { + docker { + image 'adoptopenjdk/openjdk8:latest' + args '-v $HOME/.m2:/root/.m2' + } + } + environment { + ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') + } + steps { + sh "PROFILE=axiom-1.3,convergence,testing ci/test.sh" + } + } stage("Test: spring-buildsnapshot (jdk8)") { agent { docker { @@ -39,7 +53,35 @@ pipeline { ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') } steps { - sh "PROFILE=spring-buildsnapshot,convergence ci/test.sh" + sh "PROFILE=spring-buildsnapshot,convergence,testing ci/test.sh" + } + } + stage("Test: spring-security-5.6 (jdk8)") { + agent { + docker { + image 'adoptopenjdk/openjdk8:latest' + args '-v $HOME/.m2:/root/.m2' + } + } + environment { + ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') + } + steps { + sh "PROFILE=spring-security-5.6,convergence,testing ci/test.sh" + } + } + stage("Test: spring-security-5.7 (jdk8)") { + agent { + docker { + image 'adoptopenjdk/openjdk8:latest' + args '-v $HOME/.m2:/root/.m2' + } + } + environment { + ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') + } + steps { + sh "PROFILE=spring-security-5.7,convergence,testing ci/test.sh" } } stage("Test: baseline (jdk11)") { @@ -53,7 +95,7 @@ pipeline { ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') } steps { - sh "PROFILE=distribute,java11,convergence ci/test.sh" + sh "PROFILE=distribute,java11,convergence,testing ci/test.sh" } } stage("Test: spring-buildsnapshot (jdk11)") { @@ -67,7 +109,7 @@ pipeline { ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') } steps { - sh "PROFILE=spring-buildsnapshot,java11,convergence ci/test.sh" + sh "PROFILE=spring-buildsnapshot,java11,convergence,testing ci/test.sh" } } stage("Test: spring-buildsnapshot (jdk16)") { @@ -81,7 +123,7 @@ pipeline { ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') } steps { - sh "PROFILE=spring-buildsnapshot,java11,convergence ci/test.sh" + sh "PROFILE=spring-buildsnapshot,java11,convergence,testing ci/test.sh" } } } diff --git a/pom.xml b/pom.xml index 74910cfb..9d9dec54 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,10 @@ 4.1.2 1.9.6 3.9.0 - 1.2.20 + 1.2.20 + 1.3.0 + 1.4.0 + ${axiom-1.4.version} 3.1 2.5 1.6.1 @@ -109,8 +112,8 @@ 1.7.25 4.2.1 1.4.0 - 5.3.17 - 5.5.5 + 5.3.23 + 5.5.8 1.8.3 1.6.0 4.2.0 @@ -228,11 +231,28 @@ + + axiom-1.3 + + ${axiom-1.3.version} + + spring-buildsnapshot - 5.3.18-SNAPSHOT - 5.5.6-SNAPSHOT + 5.3.24-SNAPSHOT + + + + spring-security-5.6 + + 5.6.8 + + + + spring-security-5.7 + + 5.7.4 @@ -286,6 +306,17 @@ + + testing + + + spring-ws-core + spring-ws-security + spring-ws-support + spring-xml + spring-ws-tests + + distribute @@ -699,6 +730,17 @@ false --illegal-access=permit + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED + --add-opens java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED + --add-opens java.xml.crypto/com.sun.org.apache.xml.internal.security=ALL-UNNAMED + --add-opens java.xml.crypto/org.jcp.xml.dsig.internal.dom=ALL-UNNAMED + --add-exports java.base/java.lang=ALL-UNNAMED + --add-exports java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED + --add-exports java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED + --add-exports java.xml.crypto/com.sun.org.apache.xml.internal.security=ALL-UNNAMED + --add-exports java.xml.crypto/org.jcp.xml.dsig.internal.dom=ALL-UNNAMED @@ -744,10 +786,6 @@ saaj-impl ${saaj-impl.version} - - javax.xml.soap - javax.xml.soap-api - jakarta.xml.soap jakarta.xml.soap-api @@ -787,6 +825,12 @@ jakarta.xml.bind jakarta.xml.bind-api 2.3.2 + + + jakarta.activation + jakarta.activation-api + + diff --git a/spring-ws-core/pom.xml b/spring-ws-core/pom.xml index 62b9e832..2b180982 100644 --- a/spring-ws-core/pom.xml +++ b/spring-ws-core/pom.xml @@ -1,13 +1,14 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.ws spring-ws 3.1.4-SNAPSHOT + ../pom.xml spring-ws-core @@ -118,6 +119,10 @@ org.codehaus.woodstox wstx-asl + + com.fasterxml.woodstox + woodstox-core + commons-logging commons-logging @@ -125,7 +130,14 @@ - + + org.apache.ws.commons.axiom + axiom-compat + ${axiom.version} + true + + + wsdl4j wsdl4j @@ -230,4 +242,20 @@ - \ No newline at end of file + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + + + diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/CachingPayload.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12CachingPayload.java similarity index 84% rename from spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/CachingPayload.java rename to spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12CachingPayload.java index b8453362..c155e6b2 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/CachingPayload.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12CachingPayload.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2005-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,15 +25,16 @@ import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; /** - * Caching payload in Axiom. + * Caching payload in Axiom 1.2. * * @author Arjen Poutsma + * @author Greg Turnquist * @since 1.5.2 */ @SuppressWarnings("Since15") -class CachingPayload extends AbstractPayload { +class Axiom12CachingPayload extends AxiomAbstractPayload { - CachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + Axiom12CachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { super(axiomBody, axiomFactory); } @@ -48,5 +49,4 @@ class CachingPayload extends AbstractPayload { public Result getResultInternal() { return getAxiomBody().getSAXResult(); } - } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/NonCachingPayload.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12NonCachingPayload.java similarity index 96% rename from spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/NonCachingPayload.java rename to spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12NonCachingPayload.java index 8159d104..0a5ea8c5 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/NonCachingPayload.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12NonCachingPayload.java @@ -35,17 +35,18 @@ import org.apache.axiom.soap.SOAPFactory; import org.springframework.util.xml.StaxUtils; /** - * Non-caching payload in Axiom. + * Non-caching payload in Axiom 1.2. * * @author Jim Cummings * @author Arjen Poutsma + * @author Greg Turnquist * @since 1.5.2 */ -class NonCachingPayload extends AbstractPayload { +class Axiom12NonCachingPayload extends AxiomAbstractPayload { private static final int BUF_SIZE = 1024; - NonCachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + Axiom12NonCachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { super(axiomBody, axiomFactory); } @@ -77,7 +78,7 @@ class NonCachingPayload extends AbstractPayload { try { this.delegate = StAXUtils.createXMLStreamWriter(baos); } catch (XMLStreamException ex) { - throw new AxiomSoapBodyException("Could not determine payload root element", ex); + throw new RuntimeException("Could not determine payload root element", ex); } } @@ -286,6 +287,5 @@ class NonCachingPayload extends AbstractPayload { public void writeProcessingInstruction(String target, String data) throws XMLStreamException { delegate.writeProcessingInstruction(target, data); } - } } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12Utils.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12Utils.java new file mode 100644 index 00000000..4459ffb1 --- /dev/null +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom12Utils.java @@ -0,0 +1,66 @@ +/* + * Copyright 2005-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.ws.soap.axiom; + +import java.io.InputStream; + +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; + +import org.apache.axiom.attachments.Attachments; +import org.apache.axiom.om.impl.MTOMConstants; +import org.apache.axiom.soap.SOAPFactory; +import org.apache.axiom.soap.SOAPMessage; +import org.apache.axiom.soap.SOAPModelBuilder; +import org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder; +import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; + +/** + * Utilities for building SOAP messages using Axiom 1.2. + * + * @author Greg Turnquist + * @since 3.1 + */ +final class Axiom12Utils { + + private Axiom12Utils() { + throw new RuntimeException("Utility class not meant to be instantiated."); + } + + static SOAPMessage getSOAPMessage(XMLInputFactory inputFactory, InputStream inputStream, String charSetEncoding, + String namespace, SOAPFactory soapFactory) throws XMLStreamException { + XMLStreamReader reader = inputFactory.createXMLStreamReader(inputStream, charSetEncoding); + SOAPModelBuilder builder = new StAXSOAPModelBuilder(reader, soapFactory, namespace); + return builder.getSOAPMessage(); + } + + static SOAPMessage getSOAPMessage(String envelopeNamespace, Attachments attachments, SOAPFactory soapFactory, + XMLStreamReader reader) { + SOAPModelBuilder builder; + + if (MTOMConstants.SWA_TYPE.equals(attachments.getAttachmentSpecType()) + || MTOMConstants.SWA_TYPE_12.equals(attachments.getAttachmentSpecType())) { + builder = new StAXSOAPModelBuilder(reader, soapFactory, envelopeNamespace); + } else if (MTOMConstants.MTOM_TYPE.equals(attachments.getAttachmentSpecType())) { + builder = new MTOMStAXSOAPModelBuilder(reader, attachments, envelopeNamespace); + } else { + throw new RuntimeException("Unknown attachment type: [" + attachments.getAttachmentSpecType() + "]"); + } + + return builder.getSOAPMessage(); + } +} diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14CachingPayload.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14CachingPayload.java new file mode 100644 index 00000000..c64110fa --- /dev/null +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14CachingPayload.java @@ -0,0 +1,51 @@ +/* + * Copyright 2005-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +import javax.xml.stream.XMLStreamReader; +import javax.xml.transform.Result; + +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMXMLStreamReaderConfiguration; +import org.apache.axiom.soap.SOAPBody; +import org.apache.axiom.soap.SOAPFactory; + +/** + * Caching payload in Axiom 1.4. + * + * @author Arjen Poutsma + * @author Greg Turnquist + * @since 3.1 + */ +class Axiom14CachingPayload extends AxiomAbstractPayload { + + Axiom14CachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + super(axiomBody, axiomFactory); + } + + @Override + protected XMLStreamReader getStreamReader(OMElement payloadElement) { + OMXMLStreamReaderConfiguration config = new OMXMLStreamReaderConfiguration(); + config.setPreserveNamespaceContext(true); + return payloadElement.getXMLStreamReader(true, config); + } + + @Override + public Result getResultInternal() { + return getAxiomBody().getSAXResult(); + } +} diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14NonCachingPayload.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14NonCachingPayload.java new file mode 100644 index 00000000..416cec99 --- /dev/null +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14NonCachingPayload.java @@ -0,0 +1,296 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +import java.io.ByteArrayOutputStream; +import java.io.UnsupportedEncodingException; + +import javax.xml.namespace.NamespaceContext; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; +import javax.xml.transform.Result; + +import org.apache.axiom.om.OMDataSource; +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMNamespace; +import org.apache.axiom.om.ds.StringOMDataSource; +import org.apache.axiom.om.util.StAXUtils; +import org.apache.axiom.soap.SOAPBody; +import org.apache.axiom.soap.SOAPFactory; +import org.springframework.util.xml.StaxUtils; + +/** + * Non-caching payload in Axiom 1.4. + * + * @author Jim Cummings + * @author Arjen Poutsma + * @author Greg Turnquist + * @since 3.1 + */ +class Axiom14NonCachingPayload extends AxiomAbstractPayload { + + private static final int BUF_SIZE = 1024; + + Axiom14NonCachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + super(axiomBody, axiomFactory); + } + + @Override + public Result getResultInternal() { + return StaxUtils.createCustomStaxResult(new DelegatingStreamWriter()); + } + + @Override + protected XMLStreamReader getStreamReader(OMElement payloadElement) { + return payloadElement.getXMLStreamReaderWithoutCaching(); + } + + private class DelegatingStreamWriter implements XMLStreamWriter { + + private final ByteArrayOutputStream baos = new ByteArrayOutputStream(BUF_SIZE); + + private final XMLStreamWriter delegate; + + private QName name; + + private String encoding = "UTF-8"; + + private int elementDepth = 0; + + private boolean payloadAdded = false; + + private DelegatingStreamWriter() { + try { + this.delegate = StAXUtils.createXMLStreamWriter(baos); + } catch (XMLStreamException ex) { + throw new RuntimeException("Could not determine payload root element", ex); + } + } + + @Override + public void writeStartDocument() throws XMLStreamException { + // ignored + } + + @Override + public void writeStartDocument(String version) throws XMLStreamException { + // ignored + } + + @Override + public void writeStartDocument(String encoding, String version) throws XMLStreamException { + this.encoding = encoding; + } + + @Override + public void writeStartElement(String localName) throws XMLStreamException { + if (name == null) { + name = new QName(localName); + } + elementDepth++; + delegate.writeStartElement(localName); + } + + @Override + public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { + if (name == null) { + name = new QName(namespaceURI, localName); + } + elementDepth++; + delegate.writeStartElement(namespaceURI, localName); + } + + @Override + public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { + if (name == null) { + name = new QName(namespaceURI, localName, prefix); + } + elementDepth++; + delegate.writeStartElement(prefix, localName, namespaceURI); + } + + @Override + public void writeEndElement() throws XMLStreamException { + elementDepth--; + delegate.writeEndElement(); + addPayload(); + } + + private void addPayload() throws XMLStreamException { + if (elementDepth <= 0 && !payloadAdded) { + delegate.flush(); + if (baos.size() > 0) { + SOAPFactory axiomFactory = getAxiomFactory(); + try { + OMDataSource dataSource = new StringOMDataSource(baos.toString(encoding)); + OMNamespace namespace = axiomFactory.createOMNamespace(name.getNamespaceURI(), name.getPrefix()); + OMElement payloadElement = axiomFactory.createOMElement(dataSource, name.getLocalPart(), namespace); + getAxiomBody().addChild(payloadElement); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + payloadAdded = true; + } + } + } + + @Override + public void writeEmptyElement(String localName) throws XMLStreamException { + if (name == null) { + name = new QName(localName); + } + delegate.writeEmptyElement(localName); + addPayload(); + } + + @Override + public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException { + if (name == null) { + name = new QName(namespaceURI, localName); + } + delegate.writeEmptyElement(namespaceURI, localName); + addPayload(); + } + + @Override + public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { + if (name == null) { + name = new QName(namespaceURI, localName, prefix); + } + delegate.writeEmptyElement(prefix, localName, namespaceURI); + addPayload(); + } + + @Override + public void writeEndDocument() throws XMLStreamException { + elementDepth = 0; + delegate.writeEndDocument(); + addPayload(); + } + + // Delegation + + @Override + public void close() throws XMLStreamException { + addPayload(); + delegate.close(); + } + + @Override + public void flush() throws XMLStreamException { + delegate.flush(); + } + + @Override + public NamespaceContext getNamespaceContext() { + return delegate.getNamespaceContext(); + } + + @Override + public String getPrefix(String uri) throws XMLStreamException { + return delegate.getPrefix(uri); + } + + @Override + public Object getProperty(String name) throws IllegalArgumentException { + return delegate.getProperty(name); + } + + @Override + public void setDefaultNamespace(String uri) throws XMLStreamException { + delegate.setDefaultNamespace(uri); + } + + @Override + public void setNamespaceContext(NamespaceContext context) throws XMLStreamException { + delegate.setNamespaceContext(context); + } + + @Override + public void setPrefix(String prefix, String uri) throws XMLStreamException { + delegate.setPrefix(prefix, uri); + } + + @Override + public void writeAttribute(String localName, String value) throws XMLStreamException { + delegate.writeAttribute(localName, value); + } + + @Override + public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException { + delegate.writeAttribute(namespaceURI, localName, value); + } + + @Override + public void writeAttribute(String prefix, String namespaceURI, String localName, String value) + throws XMLStreamException { + delegate.writeAttribute(prefix, namespaceURI, localName, value); + } + + @Override + public void writeCData(String data) throws XMLStreamException { + delegate.writeCData(data); + } + + @Override + public void writeCharacters(char[] text, int start, int len) throws XMLStreamException { + delegate.writeCharacters(text, start, len); + } + + @Override + public void writeCharacters(String text) throws XMLStreamException { + delegate.writeCharacters(text); + } + + @Override + public void writeComment(String data) throws XMLStreamException { + delegate.writeComment(data); + } + + @Override + public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException { + delegate.writeDefaultNamespace(namespaceURI); + } + + @Override + public void writeDTD(String dtd) throws XMLStreamException { + delegate.writeDTD(dtd); + } + + @Override + public void writeEntityRef(String name) throws XMLStreamException { + delegate.writeEntityRef(name); + } + + @Override + public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException { + delegate.writeNamespace(prefix, namespaceURI); + } + + @Override + public void writeProcessingInstruction(String target) throws XMLStreamException { + delegate.writeProcessingInstruction(target); + } + + @Override + public void writeProcessingInstruction(String target, String data) throws XMLStreamException { + delegate.writeProcessingInstruction(target, data); + } + } +} diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14Utils.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14Utils.java new file mode 100644 index 00000000..a997f181 --- /dev/null +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Axiom14Utils.java @@ -0,0 +1,62 @@ +/* + * Copyright 2005-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.ws.soap.axiom; + +import java.io.InputStream; + +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; + +import org.apache.axiom.attachments.Attachments; +import org.apache.axiom.om.OMXMLBuilderFactory; +import org.apache.axiom.om.impl.MTOMConstants; +import org.apache.axiom.soap.SOAPFactory; +import org.apache.axiom.soap.SOAPMessage; +import org.apache.axiom.soap.SOAPModelBuilder; + +/** + * Utilities for building SOAP messages using Axiom 1.4. + * + * @author Greg Turnquist + * @since 3.1 + */ +final class Axiom14Utils { + + private Axiom14Utils() { + throw new RuntimeException("Utility class not meant to be instantiated."); + } + + static SOAPMessage getSOAPMessage(XMLInputFactory inputFactory, InputStream inputStream, String charSetEncoding, + SOAPFactory soapFactory) throws XMLStreamException { + XMLStreamReader reader = inputFactory.createXMLStreamReader(inputStream, charSetEncoding); + SOAPModelBuilder builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(soapFactory.getMetaFactory(), reader); + return builder.getSOAPMessage(); + } + + static SOAPMessage getSOAPMessage(Attachments attachments, SOAPFactory soapFactory, XMLStreamReader reader) { + SOAPModelBuilder builder; + if (MTOMConstants.SWA_TYPE.equals(attachments.getAttachmentSpecType()) + || MTOMConstants.SWA_TYPE_12.equals(attachments.getAttachmentSpecType())) { + builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(soapFactory.getMetaFactory(), reader); + } else if (MTOMConstants.MTOM_TYPE.equals(attachments.getAttachmentSpecType())) { + builder = OMXMLBuilderFactory.createSOAPModelBuilder(soapFactory.getMetaFactory(), attachments); + } else { + throw new RuntimeException("Unknown attachment type: [" + attachments.getAttachmentSpecType() + "]"); + } + return builder.getSOAPMessage(); + } +} diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AbstractPayload.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomAbstractPayload.java similarity index 80% rename from spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AbstractPayload.java rename to spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomAbstractPayload.java index c40c6c89..ae3f1d1d 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AbstractPayload.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomAbstractPayload.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2005-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ package org.springframework.ws.soap.axiom; +import java.util.Iterator; + import javax.xml.stream.XMLStreamReader; import javax.xml.transform.Result; import javax.xml.transform.Source; @@ -26,21 +28,21 @@ import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; import org.springframework.util.Assert; import org.springframework.util.xml.StaxUtils; -import org.springframework.ws.soap.axiom.support.AxiomUtils; /** - * Abstract base class for {@link Payload} implementations. + * Abstract base class for Axiom 1.4 {@link Payload} implementations. * * @author Arjen Poutsma - * @since 2.0 + * @author Greg Turnquist + * @since 3.1 */ -abstract class AbstractPayload extends Payload { +abstract class AxiomAbstractPayload implements Payload { private final SOAPBody axiomBody; private final SOAPFactory axiomFactory; - protected AbstractPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + protected AxiomAbstractPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { Assert.notNull(axiomBody, "'axiomBody' must not be null"); Assert.notNull(axiomFactory, "'axiomFactory' must not be null"); this.axiomBody = axiomBody; @@ -58,7 +60,7 @@ abstract class AbstractPayload extends Payload { return null; } } catch (OMException ex) { - throw new AxiomSoapBodyException(ex); + throw new RuntimeException(ex); } } @@ -66,7 +68,10 @@ abstract class AbstractPayload extends Payload { @Override public final Result getResult() { - AxiomUtils.removeContents(getAxiomBody()); + for (Iterator iterator = getAxiomBody().getChildren(); iterator.hasNext();) { + iterator.next(); + iterator.remove(); + } return getResultInternal(); } @@ -83,5 +88,4 @@ abstract class AbstractPayload extends Payload { protected OMElement getPayloadElement() throws OMException { return getAxiomBody().getFirstElement(); } - } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomPayloadUtils.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomPayloadUtils.java new file mode 100644 index 00000000..ab6e284d --- /dev/null +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomPayloadUtils.java @@ -0,0 +1,50 @@ +/* + * Copyright 2005-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.ws.soap.axiom; + +import static org.springframework.ws.soap.axiom.support.AxiomUtils.AXIOM14_IS_PRESENT; + +import org.apache.axiom.soap.SOAPBody; +import org.apache.axiom.soap.SOAPFactory; + +/** + * Utility to create various {@link Payload}s for Axiom. + * + * @author Greg Turnquist + * @since 3.1 + */ +final class AxiomPayloadUtils { + + private AxiomPayloadUtils() { + throw new RuntimeException("Utility class not meant to be instantiated."); + } + + static Payload createCachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + if (AXIOM14_IS_PRESENT()) { + return new Axiom14CachingPayload(axiomBody, axiomFactory); + } else { + return new Axiom12CachingPayload(axiomBody, axiomFactory); + } + } + + static Payload createNonCachingPayload(SOAPBody axiomBody, SOAPFactory axiomFactory) { + if (AXIOM14_IS_PRESENT()) { + return new Axiom14NonCachingPayload(axiomBody, axiomFactory); + } else { + return new Axiom12NonCachingPayload(axiomBody, axiomFactory); + } + } +} diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Body.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Body.java index da4b2206..8fe0da99 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Body.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Body.java @@ -22,13 +22,7 @@ import javax.xml.namespace.QName; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.soap.SOAP11Constants; -import org.apache.axiom.soap.SOAPBody; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPFault; -import org.apache.axiom.soap.SOAPFaultCode; -import org.apache.axiom.soap.SOAPFaultReason; -import org.apache.axiom.soap.SOAPProcessingException; +import org.apache.axiom.soap.*; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.ws.soap.axiom.support.AxiomUtils; diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Header.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Header.java index 6aebf216..7e5fe906 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Header.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap11Header.java @@ -47,7 +47,7 @@ class AxiomSoap11Header extends AxiomSoapHeader implements Soap11Header { if (!ObjectUtils.isEmpty(actors)) { rolePlayer = new RolePlayer() { - public List getRoles() { + public List getRoles() { return Arrays.asList(actors); } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Body.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Body.java index 94942a7b..b7240dd8 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Body.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Body.java @@ -20,15 +20,7 @@ import java.util.Locale; import javax.xml.namespace.QName; -import org.apache.axiom.soap.SOAP12Constants; -import org.apache.axiom.soap.SOAPBody; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPFault; -import org.apache.axiom.soap.SOAPFaultCode; -import org.apache.axiom.soap.SOAPFaultReason; -import org.apache.axiom.soap.SOAPFaultText; -import org.apache.axiom.soap.SOAPFaultValue; -import org.apache.axiom.soap.SOAPProcessingException; +import org.apache.axiom.soap.*; import org.springframework.util.Assert; import org.springframework.ws.soap.axiom.support.AxiomUtils; import org.springframework.ws.soap.soap12.Soap12Body; diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Fault.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Fault.java index 984ba78f..18e9b350 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Fault.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Fault.java @@ -24,15 +24,7 @@ import java.util.Locale; import javax.xml.namespace.QName; import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPFault; -import org.apache.axiom.soap.SOAPFaultCode; -import org.apache.axiom.soap.SOAPFaultNode; -import org.apache.axiom.soap.SOAPFaultReason; -import org.apache.axiom.soap.SOAPFaultSubCode; -import org.apache.axiom.soap.SOAPFaultText; -import org.apache.axiom.soap.SOAPFaultValue; -import org.apache.axiom.soap.SOAPProcessingException; +import org.apache.axiom.soap.*; import org.springframework.util.StringUtils; import org.springframework.ws.soap.axiom.support.AxiomUtils; import org.springframework.ws.soap.soap12.Soap12Fault; diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Header.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Header.java index 5ae7eac7..f880ea51 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Header.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoap12Header.java @@ -25,11 +25,7 @@ import javax.xml.namespace.QName; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.soap.RolePlayer; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPHeader; -import org.apache.axiom.soap.SOAPHeaderBlock; -import org.apache.axiom.soap.SOAPProcessingException; +import org.apache.axiom.soap.*; import org.springframework.util.ObjectUtils; import org.springframework.ws.soap.SoapHeaderElement; import org.springframework.ws.soap.SoapHeaderException; @@ -84,7 +80,7 @@ class AxiomSoap12Header extends AxiomSoapHeader implements Soap12Header { if (!ObjectUtils.isEmpty(roles)) { rolePlayer = new RolePlayer() { - public List getRoles() { + public List getRoles() { return Arrays.asList(roles); } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapBody.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapBody.java index 23998fb8..d49d9072 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapBody.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapBody.java @@ -42,9 +42,9 @@ abstract class AxiomSoapBody extends AxiomSoapElement implements SoapBody { protected AxiomSoapBody(SOAPBody axiomBody, SOAPFactory axiomFactory, boolean payloadCaching) { super(axiomBody, axiomFactory); if (payloadCaching) { - payload = new CachingPayload(axiomBody, axiomFactory); + payload = AxiomPayloadUtils.createCachingPayload(axiomBody, axiomFactory); } else { - payload = new NonCachingPayload(axiomBody, axiomFactory); + payload = AxiomPayloadUtils.createNonCachingPayload(axiomBody, axiomFactory); } } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapEnvelope.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapEnvelope.java index 643a3991..36706a07 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapEnvelope.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapEnvelope.java @@ -17,12 +17,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMException; -import org.apache.axiom.soap.SOAP11Constants; -import org.apache.axiom.soap.SOAP12Constants; -import org.apache.axiom.soap.SOAPBody; -import org.apache.axiom.soap.SOAPEnvelope; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPHeader; +import org.apache.axiom.soap.*; import org.springframework.ws.soap.SoapBody; import org.springframework.ws.soap.SoapEnvelope; import org.springframework.ws.soap.SoapHeader; diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapFault.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapFault.java index 369f3f57..07591cf3 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapFault.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapFault.java @@ -17,11 +17,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMException; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPFault; -import org.apache.axiom.soap.SOAPFaultDetail; -import org.apache.axiom.soap.SOAPFaultRole; -import org.apache.axiom.soap.SOAPProcessingException; +import org.apache.axiom.soap.*; import org.springframework.ws.soap.SoapFault; import org.springframework.ws.soap.SoapFaultDetail; diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessage.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessage.java index 2904d6c9..5625ecf8 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessage.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessage.java @@ -16,12 +16,7 @@ package org.springframework.ws.soap.axiom; -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; +import java.io.*; import java.util.Iterator; import javax.activation.DataHandler; @@ -35,11 +30,7 @@ import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMXMLBuilderFactory; import org.apache.axiom.om.impl.MTOMConstants; import org.apache.axiom.om.impl.OMMultipartWriter; -import org.apache.axiom.soap.SOAPBody; -import org.apache.axiom.soap.SOAPEnvelope; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPMessage; -import org.apache.axiom.soap.SOAPProcessingException; +import org.apache.axiom.soap.*; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.ws.mime.Attachment; diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessageFactory.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessageFactory.java index 1e2ec0d1..2df94f30 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessageFactory.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessageFactory.java @@ -29,16 +29,7 @@ import javax.xml.stream.XMLStreamReader; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMException; -import org.apache.axiom.om.impl.MTOMConstants; -import org.apache.axiom.soap.SOAP11Constants; -import org.apache.axiom.soap.SOAP11Version; -import org.apache.axiom.soap.SOAP12Constants; -import org.apache.axiom.soap.SOAP12Version; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPMessage; -import org.apache.axiom.soap.SOAPModelBuilder; -import org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder; -import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; +import org.apache.axiom.soap.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.InitializingBean; @@ -48,6 +39,7 @@ import org.springframework.ws.server.endpoint.interceptor.PayloadLoggingIntercep import org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping; import org.springframework.ws.soap.SoapMessageFactory; import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.axiom.support.AxiomUtils; import org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor; import org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping; import org.springframework.ws.soap.support.SoapUtils; @@ -184,7 +176,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing /** * Sets whether internal entity references should be replaced with their replacement text and report them as * characters. - * + * * @see XMLInputFactory#IS_REPLACING_ENTITY_REFERENCES */ public void setReplacingEntityReferences(boolean replacingEntityReferences) { @@ -193,7 +185,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing /** * Sets whether external parsed entities should be resolved. - * + * * @see XMLInputFactory#IS_SUPPORTING_EXTERNAL_ENTITIES */ public void setSupportingExternalEntities(boolean supportingExternalEntities) { @@ -268,10 +260,17 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing /** Creates an AxiomSoapMessage without attachments. */ private AxiomSoapMessage createAxiomSoapMessage(InputStream inputStream, String contentType, String soapAction) throws XMLStreamException { - XMLStreamReader reader = inputFactory.createXMLStreamReader(inputStream, getCharSetEncoding(contentType)); - String envelopeNamespace = getSoapEnvelopeNamespace(contentType); - SOAPModelBuilder builder = new StAXSOAPModelBuilder(reader, soapFactory, envelopeNamespace); - SOAPMessage soapMessage = builder.getSOAPMessage(); + + SOAPMessage soapMessage; + + if (AxiomUtils.AXIOM14_IS_PRESENT()) { + soapMessage = Axiom14Utils.getSOAPMessage(inputFactory, inputStream, getCharSetEncoding(contentType), + soapFactory); + } else { + soapMessage = Axiom12Utils.getSOAPMessage(inputFactory, inputStream, getCharSetEncoding(contentType), + getSoapEnvelopeNamespace(contentType), soapFactory); + } + return new AxiomSoapMessage(soapMessage, soapAction, payloadCaching, langAttributeOnSoap11FaultString); } @@ -283,19 +282,20 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing attachmentCacheDir.getAbsolutePath(), Integer.toString(attachmentCacheThreshold)); XMLStreamReader reader = inputFactory.createXMLStreamReader(attachments.getRootPartInputStream(), getCharSetEncoding(attachments.getRootPartContentType())); - SOAPModelBuilder builder; - String envelopeNamespace = getSoapEnvelopeNamespace(contentType); - if (MTOMConstants.SWA_TYPE.equals(attachments.getAttachmentSpecType()) - || MTOMConstants.SWA_TYPE_12.equals(attachments.getAttachmentSpecType())) { - builder = new StAXSOAPModelBuilder(reader, soapFactory, envelopeNamespace); - } else if (MTOMConstants.MTOM_TYPE.equals(attachments.getAttachmentSpecType())) { - builder = new MTOMStAXSOAPModelBuilder(reader, attachments, envelopeNamespace); - } else { - throw new AxiomSoapMessageCreationException( - "Unknown attachment type: [" + attachments.getAttachmentSpecType() + "]"); + + SOAPMessage soapMessage; + + try { + if (AxiomUtils.AXIOM14_IS_PRESENT()) { + soapMessage = Axiom14Utils.getSOAPMessage(attachments, soapFactory, reader); + } else { + soapMessage = Axiom12Utils.getSOAPMessage(getSoapEnvelopeNamespace(contentType), attachments, soapFactory, + reader); + } + } catch (RuntimeException e) { + throw new AxiomSoapMessageCreationException(e.getMessage()); } - return new AxiomSoapMessage(builder.getSOAPMessage(), attachments, soapAction, payloadCaching, - langAttributeOnSoap11FaultString); + return new AxiomSoapMessage(soapMessage, attachments, soapAction, payloadCaching, langAttributeOnSoap11FaultString); } private String getSoapEnvelopeNamespace(String contentType) { diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Payload.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Payload.java index 3706aff7..fda76fbb 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Payload.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/Payload.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2005-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,31 +13,31 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.springframework.ws.soap.axiom; import javax.xml.transform.Result; import javax.xml.transform.Source; /** - * Defines the contract for payloads in Axiom. + * Defines the contract for payloads. * * @author Arjen Poutsma + * @author Greg Turnquist * @since 1.5.2 */ -abstract class Payload { +interface Payload { /** * Returns the source of the payload. * * @return the source of the payload */ - public abstract Source getSource(); + Source getSource(); /** * Returns the result of the payload. * * @return the result of the payload */ - public abstract Result getResult(); + Result getResult(); } diff --git a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java index 33a99e2f..ecd2aa9b 100644 --- a/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java +++ b/spring-ws-core/src/main/java/org/springframework/ws/soap/axiom/support/AxiomUtils.java @@ -25,12 +25,9 @@ import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.dom.DOMSource; -import org.apache.axiom.om.OMContainer; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMException; -import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.om.OMXMLBuilderFactory; +import org.apache.axiom.om.*; import org.apache.axiom.soap.SOAPEnvelope; +import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; import org.springframework.xml.DocumentBuilderFactoryUtils; import org.w3c.dom.Document; @@ -47,7 +44,18 @@ import org.w3c.dom.Element; * @since 1.0.0 */ @SuppressWarnings("Since15") -public abstract class AxiomUtils { +public final class AxiomUtils { + + private AxiomUtils() { + throw new RuntimeException("Utility class not meant to be instantiated."); + } + + /** + * Detect if Axiom 1.4 is on the classpath. + */ + public static boolean AXIOM14_IS_PRESENT() { + return ClassUtils.isPresent("org.apache.axiom.om.ds.StringOMDataSource", null); + } /** * Converts a {@code javax.xml.namespace.QName} to a {@code org.apache.axiom.om.OMNamespace}. A {@code OMElement} is @@ -92,7 +100,9 @@ public abstract class AxiomUtils { return StringUtils.parseLocaleString(language); } - /** Removes the contents (i.e. children) of the container. */ + /** + * Removes the contents (i.e. children) of the container. + */ public static void removeContents(OMContainer container) { for (Iterator iterator = container.getChildren(); iterator.hasNext();) { iterator.next(); @@ -136,5 +146,4 @@ public abstract class AxiomUtils { public static SOAPEnvelope toEnvelope(Document document) { return OMXMLBuilderFactory.createSOAPModelBuilder(new DOMSource(document)).getSOAPEnvelope(); } - } diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/Axiom14DetectionTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/Axiom14DetectionTest.java new file mode 100644 index 00000000..9888174e --- /dev/null +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/Axiom14DetectionTest.java @@ -0,0 +1,14 @@ +package org.springframework.ws.soap.axiom; + +import org.junit.jupiter.api.Test; +import org.springframework.ws.soap.axiom.support.AxiomUtils; + +import static org.assertj.core.api.Assertions.assertThat; + +public class Axiom14DetectionTest { + + @Test + void detectedAxiom14Correctly() { + assertThat(AxiomUtils.AXIOM14_IS_PRESENT()).isTrue(); + } +} diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11BodyTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11BodyTest.java index eae9b3e1..d8d811be 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11BodyTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11BodyTest.java @@ -21,6 +21,8 @@ import org.apache.axiom.soap.SOAPFactory; import org.junit.jupiter.api.Test; import org.springframework.ws.soap.SoapBody; import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory; import org.springframework.ws.soap.soap11.AbstractSoap11BodyTestCase; import org.springframework.xml.transform.StringSource; diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11EnvelopeTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11EnvelopeTest.java index 85b4fdfb..d01a026a 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11EnvelopeTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11EnvelopeTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAPFactory; import org.springframework.ws.soap.SoapEnvelope; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; import org.springframework.ws.soap.soap11.AbstractSoap11EnvelopeTestCase; public class AxiomSoap11EnvelopeTest extends AbstractSoap11EnvelopeTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11HeaderTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11HeaderTest.java index 5c05d841..fcc8cade 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11HeaderTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11HeaderTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAPFactory; import org.springframework.ws.soap.SoapHeader; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; import org.springframework.ws.soap.soap11.AbstractSoap11HeaderTestCase; public class AxiomSoap11HeaderTest extends AbstractSoap11HeaderTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageFactoryTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageFactoryTest.java index e2b06499..d1069559 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageFactoryTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageFactoryTest.java @@ -16,7 +16,8 @@ package org.springframework.ws.soap.axiom; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -28,6 +29,8 @@ import org.junit.jupiter.api.Test; import org.springframework.ws.InvalidXmlException; import org.springframework.ws.WebServiceMessage; import org.springframework.ws.WebServiceMessageFactory; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory; import org.springframework.ws.soap.soap11.AbstractSoap11MessageFactoryTestCase; import org.springframework.ws.transport.MockTransportInputStream; import org.springframework.ws.transport.TransportInputStream; diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageTest.java index e53168f5..71251008 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11MessageTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAPFactory; import org.springframework.ws.soap.SoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; import org.springframework.ws.soap.soap11.AbstractSoap11MessageTestCase; public class AxiomSoap11MessageTest extends AbstractSoap11MessageTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingBodyTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingBodyTest.java index 46c42a24..f704a740 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingBodyTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingBodyTest.java @@ -18,6 +18,8 @@ package org.springframework.ws.soap.axiom; import org.springframework.ws.soap.SoapBody; import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory; import org.springframework.ws.soap.soap11.AbstractSoap11BodyTestCase; public class AxiomSoap11NonCachingBodyTest extends AbstractSoap11BodyTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingMessageTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingMessageTest.java index a03c53bb..500e9fdf 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingMessageTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap11NonCachingMessageTest.java @@ -16,7 +16,7 @@ package org.springframework.ws.soap.axiom; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; import org.apache.axiom.om.OMSourcedElement; import org.springframework.ws.soap.SoapBody; diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12BodyTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12BodyTest.java index 5ace9440..1348665a 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12BodyTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12BodyTest.java @@ -21,6 +21,8 @@ import org.apache.axiom.soap.SOAPFactory; import org.junit.jupiter.api.Test; import org.springframework.ws.soap.SoapBody; import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory; import org.springframework.ws.soap.soap12.AbstractSoap12BodyTestCase; import org.springframework.xml.transform.StringSource; diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12EnvelopeTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12EnvelopeTest.java index adbdbb2f..ca05b8fa 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12EnvelopeTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12EnvelopeTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAPFactory; import org.springframework.ws.soap.SoapEnvelope; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; import org.springframework.ws.soap.soap12.AbstractSoap12EnvelopeTestCase; public class AxiomSoap12EnvelopeTest extends AbstractSoap12EnvelopeTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12HeaderTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12HeaderTest.java index dc62420f..459ccd22 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12HeaderTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12HeaderTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAPFactory; import org.springframework.ws.soap.SoapHeader; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; import org.springframework.ws.soap.soap12.AbstractSoap12HeaderTestCase; public class AxiomSoap12HeaderTest extends AbstractSoap12HeaderTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageFactoryTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageFactoryTest.java index 81c4e6cd..3c715001 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageFactoryTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageFactoryTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.springframework.ws.InvalidXmlException; import org.springframework.ws.WebServiceMessageFactory; import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory; import org.springframework.ws.soap.soap12.AbstractSoap12MessageFactoryTestCase; public class AxiomSoap12MessageFactoryTest extends AbstractSoap12MessageFactoryTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageTest.java index fb015936..79d53a3e 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12MessageTest.java @@ -19,6 +19,7 @@ package org.springframework.ws.soap.axiom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAPFactory; import org.springframework.ws.soap.SoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; import org.springframework.ws.soap.soap12.AbstractSoap12MessageTestCase; public class AxiomSoap12MessageTest extends AbstractSoap12MessageTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingBodyTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingBodyTest.java index 0e6de3b1..8ffa6382 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingBodyTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingBodyTest.java @@ -18,6 +18,8 @@ package org.springframework.ws.soap.axiom; import org.springframework.ws.soap.SoapBody; import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; +import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory; import org.springframework.ws.soap.soap12.AbstractSoap12BodyTestCase; public class AxiomSoap12NonCachingBodyTest extends AbstractSoap12BodyTestCase { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingMessageTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingMessageTest.java index 4eefbf16..d9c476e6 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingMessageTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoap12NonCachingMessageTest.java @@ -16,7 +16,7 @@ package org.springframework.ws.soap.axiom; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; import org.apache.axiom.om.OMSourcedElement; import org.springframework.ws.soap.SoapBody; diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoapFaultDetailTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoapFaultDetailTest.java index 31ab9779..dfa88fe2 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoapFaultDetailTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/AxiomSoapFaultDetailTest.java @@ -16,7 +16,7 @@ package org.springframework.ws.soap.axiom; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; import java.io.StringReader; @@ -27,6 +27,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.ws.soap.SoapFault; import org.springframework.ws.soap.SoapFaultDetail; +import org.springframework.ws.soap.axiom.AxiomSoapMessage; @SuppressWarnings("Since15") public class AxiomSoapFaultDetailTest { diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/NonCachingPayloadTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/NonCachingPayloadTest.java index 6e578a05..2c67a599 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/NonCachingPayloadTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/NonCachingPayloadTest.java @@ -16,7 +16,7 @@ package org.springframework.ws.soap.axiom; -import static org.xmlunit.assertj.XmlAssert.*; +import static org.xmlunit.assertj.XmlAssert.assertThat; import java.io.StringWriter; @@ -28,6 +28,8 @@ import org.apache.axiom.soap.SOAPFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.util.xml.StaxUtils; +import org.springframework.ws.soap.axiom.AxiomPayloadUtils; +import org.springframework.ws.soap.axiom.Payload; @SuppressWarnings("Since15") public class NonCachingPayloadTest { @@ -41,7 +43,7 @@ public class NonCachingPayloadTest { SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory(); body = soapFactory.createSOAPBody(); - payload = new NonCachingPayload(body, soapFactory); + payload = AxiomPayloadUtils.createNonCachingPayload(body, soapFactory); } @Test diff --git a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/support/AxiomUtilsTest.java b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/support/AxiomUtilsTest.java index 3f930727..0dfedb0b 100644 --- a/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/support/AxiomUtilsTest.java +++ b/spring-ws-core/src/test/java/org/springframework/ws/soap/axiom/support/AxiomUtilsTest.java @@ -16,20 +16,7 @@ package org.springframework.ws.soap.axiom.support; -import static org.assertj.core.api.Assertions.*; - -import java.io.StringWriter; -import java.util.Locale; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.om.OMXMLBuilderFactory; +import org.apache.axiom.om.*; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPModelBuilder; @@ -38,11 +25,20 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.util.FileCopyUtils; +import org.springframework.ws.soap.axiom.support.AxiomUtils; import org.springframework.xml.DocumentBuilderFactoryUtils; import org.springframework.xml.sax.SaxUtils; import org.w3c.dom.Document; import org.xmlunit.assertj.XmlAssert; +import javax.xml.namespace.QName; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.StringWriter; +import java.util.Locale; + +import static org.assertj.core.api.Assertions.assertThat; + public class AxiomUtilsTest { private OMElement element; diff --git a/spring-ws-security/pom.xml b/spring-ws-security/pom.xml index 3ea884d4..217ff797 100644 --- a/spring-ws-security/pom.xml +++ b/spring-ws-security/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 @@ -163,6 +163,10 @@ org.codehaus.woodstox woodstox-core-asl + + com.fasterxml.woodstox + woodstox-core + jakarta.xml.bind jakarta.xml.bind-api @@ -224,8 +228,8 @@ wstx-asl - org.codehaus.woodstox - woodstox-core-asl + com.fasterxml.woodstox + woodstox-core commons-logging @@ -264,4 +268,4 @@ - \ No newline at end of file + diff --git a/spring-ws-tests/pom.xml b/spring-ws-tests/pom.xml new file mode 100644 index 00000000..b1d6aaed --- /dev/null +++ b/spring-ws-tests/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.springframework.ws + spring-ws + 3.1.4-SNAPSHOT + ../pom.xml + + + spring-ws-tests + pom + A collection of modules to test various scenarios with Spring WS + + + spring-ws-axiom-1.2-tests + + + diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/pom.xml b/spring-ws-tests/spring-ws-axiom-1.2-tests/pom.xml new file mode 100644 index 00000000..cc069b37 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/pom.xml @@ -0,0 +1,66 @@ + + 4.0.0 + + + org.springframework.ws + spring-ws-tests + 3.1.4-SNAPSHOT + ../pom.xml + + + spring-ws-axiom-1.2-tests + + + + + org.springframework.ws + spring-ws-core + ${project.parent.version} + + + + org.springframework.ws + spring-ws-core + ${project.parent.version} + test-jar + test + + + + org.apache.ws.commons.axiom + axiom-api + ${axiom-1.2.version} + true + + + commons-logging + commons-logging + + + + + org.apache.ws.commons.axiom + axiom-impl + ${axiom-1.2.version} + true + + + org.codehaus.woodstox + wstx-asl + + + com.fasterxml.woodstox + woodstox-core + + + commons-logging + commons-logging + + + + + + + + diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12DetectionTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12DetectionTest.java new file mode 100644 index 00000000..4d5f9568 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12DetectionTest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.ws.soap.axiom; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; +import org.springframework.ws.soap.axiom.support.AxiomUtils; + +public class Axiom12DetectionTest { + + @Test + void detectedAxiom12Correctly() { + assertThat(AxiomUtils.AXIOM14_IS_PRESENT()).isFalse(); + } +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12NonCachingPayloadTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12NonCachingPayloadTest.java new file mode 100644 index 00000000..bc8df699 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12NonCachingPayloadTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12NonCachingPayloadTest extends NonCachingPayloadTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11BodyTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11BodyTest.java new file mode 100644 index 00000000..671938e2 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11BodyTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11BodyTest extends AxiomSoap11BodyTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11EnvelopeTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11EnvelopeTest.java new file mode 100644 index 00000000..a3f91e7f --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11EnvelopeTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11EnvelopeTest extends AxiomSoap11EnvelopeTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11HeaderTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11HeaderTest.java new file mode 100644 index 00000000..f8d806d3 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11HeaderTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11HeaderTest extends AxiomSoap11HeaderTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11MessageFactoryTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11MessageFactoryTest.java new file mode 100644 index 00000000..c0052e4f --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11MessageFactoryTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2012 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11MessageFactoryTest extends AxiomSoap11MessageFactoryTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11MessageTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11MessageTest.java new file mode 100644 index 00000000..00ddb51f --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11MessageTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11MessageTest extends AxiomSoap11MessageTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11NonCachingBodyTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11NonCachingBodyTest.java new file mode 100644 index 00000000..f48a7b67 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11NonCachingBodyTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11NonCachingBodyTest extends AxiomSoap11NonCachingBodyTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11NonCachingMessageTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11NonCachingMessageTest.java new file mode 100644 index 00000000..9a1c0412 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap11NonCachingMessageTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap11NonCachingMessageTest extends AxiomSoap11NonCachingMessageTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12BodyTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12BodyTest.java new file mode 100644 index 00000000..9007c571 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12BodyTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12BodyTest extends AxiomSoap12BodyTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12EnvelopeTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12EnvelopeTest.java new file mode 100644 index 00000000..5295d422 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12EnvelopeTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12EnvelopeTest extends AxiomSoap12EnvelopeTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12HeaderTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12HeaderTest.java new file mode 100644 index 00000000..129acb35 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12HeaderTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12HeaderTest extends AxiomSoap12HeaderTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12MessageFactoryTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12MessageFactoryTest.java new file mode 100644 index 00000000..28f5aeac --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12MessageFactoryTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2012 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12MessageFactoryTest extends AxiomSoap12MessageFactoryTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12MessageTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12MessageTest.java new file mode 100644 index 00000000..843066cb --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12MessageTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12MessageTest extends AxiomSoap12MessageTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12NonCachingBodyTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12NonCachingBodyTest.java new file mode 100644 index 00000000..cc293d18 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12NonCachingBodyTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12NonCachingBodyTest extends AxiomSoap12NonCachingBodyTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12NonCachingMessageTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12NonCachingMessageTest.java new file mode 100644 index 00000000..89696e21 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12Soap12NonCachingMessageTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12Soap12NonCachingMessageTest extends AxiomSoap12NonCachingMessageTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12SoapFaultDetailTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12SoapFaultDetailTest.java new file mode 100644 index 00000000..9a7af4d7 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/Axiom12SoapFaultDetailTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom; + +public class Axiom12SoapFaultDetailTest extends AxiomSoapFaultDetailTest { + +} diff --git a/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/support/Axiom12UtilsTest.java b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/support/Axiom12UtilsTest.java new file mode 100644 index 00000000..c8dd1347 --- /dev/null +++ b/spring-ws-tests/spring-ws-axiom-1.2-tests/src/test/java/org/springframework/ws/soap/axiom/support/Axiom12UtilsTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.axiom.support; + +public class Axiom12UtilsTest extends AxiomUtilsTest { + +} diff --git a/spring-xml/src/main/java/org/springframework/ws/soap/axiom/package.html b/spring-xml/src/main/java/org/springframework/ws/soap/axiom/package.html new file mode 100644 index 00000000..3c731ec6 --- /dev/null +++ b/spring-xml/src/main/java/org/springframework/ws/soap/axiom/package.html @@ -0,0 +1,5 @@ + + + Provides a core interface requires for any version of Axiom. + + diff --git a/spring-xml/src/test/java/org/springframework/xml/xpath/AbstractXPathExpressionFactoryTestCase.java b/spring-xml/src/test/java/org/springframework/xml/xpath/AbstractXPathExpressionFactoryTestCase.java index 5d4c371e..1a4ca1bf 100644 --- a/spring-xml/src/test/java/org/springframework/xml/xpath/AbstractXPathExpressionFactoryTestCase.java +++ b/spring-xml/src/test/java/org/springframework/xml/xpath/AbstractXPathExpressionFactoryTestCase.java @@ -16,7 +16,8 @@ package org.springframework.xml.xpath; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import java.io.IOException; import java.io.InputStream; @@ -35,8 +36,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.SAXException; -import com.sun.org.apache.xpath.internal.XPathProcessorException; - public abstract class AbstractXPathExpressionFactoryTestCase { private Document noNamespacesDocument;