Java Object to service output mapper

We’re building an adapter service, where u are able to select an object(java) from some proprietary java API and have it’s keys set as inputs to the service and properties exposed as outputs from the service.

Now is there an easy way to do this mapping or am I gonna have to build this manually using introspection.

In short is there some sort of Java Object to Document mapper or something?

Any ideas?

it’s an adapter service template actually