Hi,

I've managed to expose my manager as a web service at last. (I previously had a problem with doing so in a Spring MVC modular project, but it worked perfectly in a Spring MVC basic project.)

My manager interface looks like this:

@WebService
public interface OrderManager extends GenericManager<Order, Long> {
        public List<Order> findByCustomerName(String customerName);
}

and the implementation class looks like this:

@WebService(serviceName = "OrderService", endpointInterface = "com.myclient.service.OrderManager") public class OrderManagerImpl extends GenericManagerImpl<Order, Long> implements OrderManager {
        OrderDao orderDao;

    public OrderManagerImpl(OrderDao orderDao) {
        super(orderDao);
        this.orderDao = orderDao;
    }

    public List<Order> findByCustomerName(String customerName) {
        return orderDao.findByCustomerName(customerName);
    }
}

In the WSDL that's generated, the findByCustomerName method has the correct type information associated with it, but unfortunately, the methods from GenericManager don't - they're all expressed as either xsd:anyType or ns1:Serializable, with ArrayOfAnyType used for collections. The parameters are all called 'in0', or 'out', or similar.

Is there a neat solution to this? I'm guessing that it's happening because of the way that generics work through type erasure.

I know I could write an implementation class which is derived from GenericManagerImpl to save writing boilerplate, and then just define my own interface, not subclassing GenericManager, including the methods I want to expose, but that doesn't feel to me like the right way to do it.

Anyone got a better option?

-Chrisl


begin:vcard
fn:Chris Lilley
n:Lilley;Chris
email;internet:[EMAIL PROTECTED]
tel;cell:07802 713947
x-mozilla-html:FALSE
url:http://www.blackpepper.co.uk
version:2.1
end:vcard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to