Webservices using Java 10
Carla Augusto

Carla Augusto @karytricia

About: Passionate about programming

Location:
Netherlands
Joined:
Aug 10, 2018

Webservices using Java 10

Publish Date: Oct 7 '18
18 13

Does anyone know if there is a way to create webservices using Java 10?

Comments 13 total

  • Dankwansere
    DankwansereOct 7, 2018

    What kind of web services, rest? soap?

    There are definitely lots of ways to create web services in java 10.

    Try looking at
    Jax-rs (rest services)

    Jax-ws (soap services)

    the Spring MVC framework comes with it's own build it rest API that can be used to create restful services.

    • Carla Augusto
      Carla AugustoOct 7, 2018

      Thanks for your answer. I'm trying to upgrade a simple java soap web service that I already created without any framework. It was created with Java 8.

      However as soon I started using Java 10, my program failed to compile since the Java EE modules has been annotated as deprecated for removal. I don't know which technology is being used to develop simple web services in Java 10.

      • Dankwansere
        DankwansereOct 7, 2018

        I would recommend using a library such as the ones I mentioned from my previous post to create web services(Rest or SOAP) in java. The benefit of libraries is that the dependencies of the java versions are usually taken care for you.

        However if you want to use pure jdk tools for creating the webservice then you can use the javax.xml.soap API

        docs.oracle.com/javase/10/docs/api...

        • Carla Augusto
          Carla AugustoOct 7, 2018

          Using the javax.xml.soap API directly doesn't work. It only works if I use the --add-modules option.

          However, this solution is for Java 9 and Java 10 only. For later versions it won't work as the Java EE related modules will be entirely removed from Java SE.

          Thanks for your reply.

      • Hauke Wesselmann
        Hauke WesselmannOct 7, 2018

        If you really need to move to Java 10 right now (maybe its a public service?), I would move over to Jax-WS as it still keeps the code pretty straightforward.

        I am doing soap services using Spring-Boot most of the time, as it allows to add stuff like jpa, security or monitoring fairly easy.

  • Carey Evans
    Carey EvansOct 8, 2018

    All the code that’s being removed from Java 9+ is available from Maven, though the exact list of dependencies and versions eludes me. This is my work in progress:

    Alternatively, it may work better to use Apache Axis 2 or Apache CXF for your web services, now that the reference implementation isn’t bundled with JavaSE.

  • MohammedEstaitieh
    MohammedEstaitiehMar 8, 2019

    Hi Carla ,can u give me some resources of soap in java i want to create web service(SOAP)

Add comment