protected static Object makeNewServiceObject(AxisService service) throws AxisFault { Object serviceObject = Utils.createServiceObject(service); if (serviceObject == null) { throw new AxisFault( Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER")); } else { return serviceObject; } }
protected static Object makeNewServiceObject(AxisService service) throws AxisFault { Object serviceObject = Utils.createServiceObject(service); if (serviceObject == null) { throw new AxisFault( Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER")); } else { return serviceObject; } }
/** * Create a new service object. Override if you want to customize how * this happens in your own MessageReceiver. * * @param msgContext * @return Returns Object. * @throws AxisFault */ protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault { Object serviceObject = Utils.createServiceObject(msgContext.getAxisService()); if (serviceObject == null) { throw new AxisFault( Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER")); } else { return serviceObject; } }
/** * Create a new service object. Override if you want to customize how * this happens in your own MessageReceiver. * * @param msgContext * @return Returns Object. * @throws AxisFault */ protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault { Object serviceObject = Utils.createServiceObject(msgContext.getAxisService()); if (serviceObject == null) { throw new AxisFault( Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER")); } else { return serviceObject; } }
/** * Get the service class for a given service. This method will first check * the {@link Constants#SERVICE_CLASS} service parameter and if that * parameter is not present, inspect the instance returned by the service * object supplier specified by {@link Constants#SERVICE_OBJECT_SUPPLIER}. * * @param service * the service * @return The service class or <code>null</code> if neither the * {@link Constants#SERVICE_CLASS} nor the * {@link Constants#SERVICE_OBJECT_SUPPLIER} parameter was found on * the service, i.e. if the service doesn't specify a service class. * @throws AxisFault * if an error occurred while attempting to load the service * class or to instantiate the service object */ public static Class<?> getServiceClass(AxisService service) throws AxisFault { Parameter serviceClassParam = service.getParameter(Constants.SERVICE_CLASS); if (serviceClassParam != null) { try { return Loader.loadClass(service.getClassLoader(), ((String) serviceClassParam.getValue()).trim()); } catch (Exception e) { throw AxisFault.makeFault(e); } } else { Object serviceObject = createServiceObject(service); return serviceObject == null ? null : serviceObject.getClass(); } }
/** * Get the service class for a given service. This method will first check * the {@link Constants#SERVICE_CLASS} service parameter and if that * parameter is not present, inspect the instance returned by the service * object supplier specified by {@link Constants#SERVICE_OBJECT_SUPPLIER}. * * @param service * the service * @return The service class or <code>null</code> if neither the * {@link Constants#SERVICE_CLASS} nor the * {@link Constants#SERVICE_OBJECT_SUPPLIER} parameter was found on * the service, i.e. if the service doesn't specify a service class. * @throws AxisFault * if an error occurred while attempting to load the service * class or to instantiate the service object */ public static Class<?> getServiceClass(AxisService service) throws AxisFault { Parameter serviceClassParam = service.getParameter(Constants.SERVICE_CLASS); if (serviceClassParam != null) { try { return Loader.loadClass(service.getClassLoader(), ((String) serviceClassParam.getValue()).trim()); } catch (Exception e) { throw AxisFault.makeFault(e); } } else { Object serviceObject = createServiceObject(service); return serviceObject == null ? null : serviceObject.getClass(); } }