Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use WebServices on Java 11? package javax.jws does not exist [duplicate]

Tags:

java

java-11

I imigrate my aplication to AdoptOpenJDK11, I have found some problems, like "package javax.jws does not exist", I already configure build path with jar "jsr181-api.jar", it's a webApplication, how I fix it ? Have something new about webservices on AdoptOpenJDK 11?

@WebService
@SOAPBinding(style = Style.RPC) // this tags doenst work

output:
error: package javax.jws does not exist
error: package javax.jws.soap does not exist

Someone know how I fix it?

like image 430
Moises Coelho Avatar asked Feb 04 '19 12:02

Moises Coelho


1 Answers

Per Replacements for deprecated JPMS modules with Java EE APIs

Use the reference implementation of JAX-WS instead.

<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-ri</artifactId>
  <version>2.3.3</version>
  <type>pom</type>
</dependency>
like image 98
Ben R. Avatar answered Oct 31 '22 11:10

Ben R.