I have been trying to publish a simple web-service using a Java first approach. 
I have a Java class which uses an underlying domain model based on interfaces, 
for example, the class I want to publish as a web-service looks something like 
this:

    public class MyService {
        public Zone getZone(long zoneID) {
            ….
        }
        public void createZone(Zone zone) {
            ….
        }
    }

Where Zone is defined by a separate interface and implemented as ZoneImpl.

I've used ServerFactoryBean to publish MyService as a web-service.

When I invoke the getZone operation from my web-service client, all works 
perfectly. When I invoke the createZone operation, my downstream processing in 
Hibernate is failing, as it expects that Zone is actually a ZoneImpl, yet what 
I get passed to the createZone() method is an instance of 
com.sun.proxy.$Proxy20.

Is there some way I can control how this works, so that a ZoneImpl is created 
when the XML in the SOAP request is unmarshalled? I'm using Aegis to manage 
data binding, as trying to use JAXB with interface based models seemed to be 
very difficult.

Reply via email to