简体   繁体   中英

Shared types in Java web service

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?

您需要将公共类打包在一个JAR文件中,并将其添加到客户端和服务中,就像其他任何第三方JAR一样。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM