public Object getProxy() throws Exception {
if (proxy == null) {
Map props = new HashMap();
props.put(AnnotationServiceFactory.ALLOW_INTERFACE, Boolean.TRUE);
ServiceFactory factory = ServiceFactoryHelper.findServiceFactory(xfire, serviceClass, null, null);
Service service = factory.create(serviceClass, props);
JBIClient client;
if (factory instanceof JAXWSServiceFactory) {
client = new JAXWSJBIClient(xfire, service);
} else {
client = new JBIClient(xfire, service);