BT

InfoQ Homepage News Spring Release Versions 3.0.4 and 2.4.3 of Spring Web Services

Spring Release Versions 3.0.4 and 2.4.3 of Spring Web Services

Bookmarks

Spring has released two versions of their Web Services project at the same time: version 3.0.4.RELEASE as the main branch of development, and version 2.4.3.RELEASE for maintenance. Both versions have been upgraded to run on Spring Framework 5.1.0 and to support Java 11.

Spring Web Services (Spring-WS) is a product of the Spring community focused on creating document-driven Web services. It aims to facilitate contract-first SOAP service development, allowing for the creation of flexible web services using one of the many ways to manipulate XML payloads.

The most notable improvement in the new Spring Web Services versions is support for Java 11. Since Java 9, a number of key Java EE packages such as core XML and SOAP-based packages, had their visibility reduced, and in Java 11, these packages have been removed altogether. Thus, to use Spring Web Services on Java 9+, developers can no longer depend on the JDK providing key XML and SOAP-based libraries.

A new Java 11 profile, which contains the extra dependencies that developers must add to their own build file, has been added to the Spring Web Services build file. Developers should add the dependencies to their build file when using Java 11. The following is a snippet of the build.xml with the dependencies needed for Java 11 on version 3.0.4.RELEASE:

<dependencies>
  <dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>jaxws-ri</artifactId>
    <version>2.3.0</version>
    <type>pom</type>
  </dependency>
  <dependency>
    <groupId>org.jvnet.staxex</groupId>
    <artifactId>stax-ex</artifactId>
    <version>1.7.8</version>
  </dependency>
  <dependency>
    <groupId>com.sun.xml.messaging.saaj</groupId>
    <artifactId>saaj-impl</artifactId>
    <version>1.3.28</version>
  </dependency>
  <dependency>
    <groupId>javax.xml.soap</groupId>
    <artifactId>javax.xml.soap-api</artifactId>
    <version>1.4.0</version>
  </dependency>
  <dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.3.0</version>
  </dependency>

Developers who still use Spring Web Services 2.4.3.RELEASE will not have problems using Java 11. This version just uses a slightly older version of the SOAP API (1.3.8). The following is a snippet of the build.xml with the dependencies needed for Java 11 on version 2.4.3.RELEASE:

<dependencies>
  <dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>jaxws-ri</artifactId>
    <version>2.3.0</version>
    <type>pom</type>
  </dependency>
  <dependency>
    <groupId>org.jvnet.staxex</groupId>
    <artifactId>stax-ex</artifactId>
    <version>1.7.8</version>
  </dependency>
  <dependency>
    <groupId>com.sun.xml.messaging.saaj</groupId>
    <artifactId>saaj-impl</artifactId>
    <version>1.3.28</version>
  </dependency>
  <dependency>
    <groupId>javax.xml.soap</groupId>
    <artifactId>javax.xml.soap-api</artifactId>
    <version>1.3.8</version>
  </dependency>
  <dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.3.0</version>
  </dependency>

Both Spring Web Services versions bring a series of bug fixes and improvements beyond the common Java 11 support, such as:

  • SaajSoapMessage created with default (empty) SoapEnvelope (SWS-1018)
  • SimpleXsdSchema not initialized property produces NullPointerException (SWS-1036)
  • Resolve version conflicts of third party libraries (SWS-1030)
  • Ehcache - OWASP Dependency Check issues (SWS-1033)

Features specific to Spring Web Services 3.0.4.RELEASE are:

  • Make SimpleXsdSchema give a more productive error message (SWS-1037)
  • Polish documentation, a set of small corrections on the documentation, such as a wrong reference to Gradle Wrapper instead of Maven Wrapper, broken links, etc. (SWS-1038)
  • Upgrade to latest version of Spring (SWS-1039)

Spring Web Services artifacts are staged on maven central and http://repo.spring.io/. There is also an example on Spring GitHub repo demonstrating how to use Spring Web Services with Spring Boot.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.