Mapping domain objects to web service proxy objects in Java

860 views Asked by At

I am trying to find a way for mapping domain objects to web service proxy objects, generated by various Java web service stacks. Both the web service (.NET) and the Java code use implementations of a particular specification. The specification is meant to provide very detailed description of domain classes, which should be implemented in different platforms. However, when a .NET implementation is exposed via a web service, the Java web service stacks end up generating WSDL based domain classes which need to be mapped to Java implementation of the domain classses, based on specification. For example there are two ENTRY classes, one from the Java implementation, the other being a parameter to a web service call, and the consumers of the web service are forced to deal with creation of a WSDL ENTRY, using a Java domain class (ENTRY).

Any recommended practices?

Best Regards, and have a great new year!

Seref Arikan

1

There are 1 answers

0
Dmitry On

You can use Java mapping frameworks.

  1. Nomin: http://nomin.sourceforge.net. It uses declarative mapping rules written in Groovy.

  2. Dozer: http://dozer.sourceforge.net. Its mapping rules are supplied as XML files.