javax.xml.rpc.Service - not present in JDK 11?

Viewed 1121

I am migrating a legacy Java 8 project to Java 11.
The project is using this class javax.xml.rpc.Service
It was being picked up from a library/jar before (I mean in Java 8): jaxrpc.jar

But since I'm migrating to Java 11, and I must comply with the requirement of "unique visibility"
( see https://stackoverflow.com/a/53824670/2300597 ),
I had to remove the JAR that contains this class javax.xml.rpc.Service (jaxrpc.jar) from my project... because now (in Java 11, in fact it's since Java 9) only one module must provide/expose the javax.xml.rpc package. But I don't think this Service class is in the JDK.

So how do I solve this?

I still need javax.xml.rpc.Service but I cannot use the jar this class is in. I seem to be stuck here.

Btw, I have the same issue with javax.xml.rpc.ServiceException

What is the right way to solve such issues?

1 Answers

The new maven coordinates for JAXRPC are here.

https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates

Specifically,

<groupId>jakarta.xml.rpc</groupId>
<artifactId>jakarta.xml.rpc-api</artifactId> 

I assume this might get you closer to something that works. However, this may not really be enough for you. JAX-RPC became JAX-WS a long time ago.


Some of the Jakarta EE specifications may be of interest to you:

Related