I am building a web app that has a class called Product, which I’d like to be shared with a JAX-WS web service.
Basically, the web application sends an instance of the Product class to the webservice, the webservice makes some changes to its fields, and sends it back as a return type.
Is it possible to share the same type in Java this way? If not, what would be the approach to solving this problem?
You’ll need to package the common classes in a JAR file and add it to both clients and services, just like any other 3rd party JAR.