开发者

Java WebService: usage of existing class instead of generated

here is what i wanna do. I've got 3 Java projects. Project A provides a WebService. Project B consumes this WebService. Project C is a shared library for both projects, which contains a clas开发者_运维技巧s XRef.

The WebService in A returns an objects of Type XRef. B consumes this WebService and uses also XRef from C. When I create a WebService Proxy, it also produces another XRef class.

Is there a way that it uses the existing XRef class instead of creating another one?


One solution would be to merge the projects and have different packaging scripts for each one.

Another solution would be to package all JAXB(I suppose) generated classes into a jar and use it in all 3 projects.

JAXB has some nice Ant tasks u can use for that and the same goes for JAX-WS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜