1

WSO2 MSF4J to improve the size adds their own jaxrs-delegate which strips quite a bit of functionality from JAX-RS standard such as UriBuilder or BadRequestException

I've noted a few of the limitations of WSO2's MSF4J implementation https://github.com/wso2/msf4j/issues/290#issuecomment-329673266

So what I tried to do was see if I can replace the WSO2 jaxrs-delegate with Jersey instead. I excluded it from the core and tried to put in the jersey and jackson dependencies, but in the end it didn't work out.

I was wondering if this is even duable.

Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265

1 Answers1

1

TL;DR

Set the BOMs (note don't use the latest versions as of the time of this writing)

<dependencyManagement>
<dependencies>
  <dependency>
    <groupId>com.fasterxml.jackson</groupId>
    <artifactId>jackson-bom</artifactId>
    <version>2.8.10</version>
    <type>pom</type>
    <scope>import</scope>
  </dependency>
  <dependency>
    <groupId>org.glassfish.jersey</groupId>
    <artifactId>jersey-bom</artifactId>
    <version>2.26-b03</version>
    <type>pom</type>
    <scope>import</scope>
  </dependency>
</dependencies>
</dependencyManagement>

Add the dependencies

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
  <groupId>javax.ws.rs</groupId>
  <artifactId>javax.ws.rs-api</artifactId>
  <version>2.1</version>
</dependency>
<dependency>
  <groupId>org.glassfish.jersey.core</groupId>
  <artifactId>jersey-client</artifactId>
</dependency>
<dependency>
  <groupId>org.glassfish.jersey.core</groupId>
  <artifactId>jersey-server</artifactId>
</dependency>

Exclude the delegate from core

<dependency>
  <groupId>org.wso2.msf4j</groupId>
  <artifactId>msf4j-core</artifactId>
  <version>2.1.0</version>
  <exclusions>
    <exclusion>
      <groupId>org.wso2.msf4j</groupId>
      <artifactId>jaxrs-delegates</artifactId>
    </exclusion>
  </exclusions>
</dependency>
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265