MethodDispatcher dispatcher = (MethodDispatcher)endpoint.getService().get( MethodDispatcher.class .getName());
private String getNamespaceToUse(Service service) { if ("true".equals(service.get("org.apache.cxf.databinding.namespace"))) { return null; } String tns = null; if (service.getServiceInfos().size() > 0) { tns = service.getServiceInfos().get(0).getInterface().getName().getNamespaceURI(); } else { tns = service.getName().getNamespaceURI(); } return tns; }
public Object get(Object key) { return wrappedService.get(key); }
private Method getMethod(Service s, OperationInfo op) { Method m = op.getProperty(Method.class.getName(), Method.class); if (m != null) { return m; } MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName()); // The ibm jdk requires the simple frontend dependency to be // present for the SimpleMethodDispatcher cast below even if // md is null (sun jdk does not). So, for the jaxrs frontend, // we can exclude the simple frontend from the aegis databinding // dependency as long as this null check is here. if (md == null) { return null; } SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md; return smd.getPrimaryMethod(op); }
private Method getMethod(Service s, OperationInfo op) { Method m = op.getProperty(Method.class.getName(), Method.class); if (m != null) { return m; } MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName()); // The ibm jdk requires the simple frontend dependency to be // present for the SimpleMethodDispatcher cast below even if // md is null (sun jdk does not). So, for the jaxrs frontend, // we can exclude the simple frontend from the aegis databinding // dependency as long as this null check is here. if (md == null) { return null; } SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md; return smd.getPrimaryMethod(op); }
private Method getMethod(Message message, BindingOperationInfo operation) { MethodDispatcher md = (MethodDispatcher) message.getExchange(). get(Service.class).get(MethodDispatcher.class.getName()); return md.getMethod(operation); }
private Method getMethod(Message message, BindingOperationInfo operation) { MethodDispatcher md = (MethodDispatcher) message.getExchange(). get(Service.class).get(MethodDispatcher.class.getName()); return md.getMethod(operation); }
@Deprecated protected void setOldMethodDispatcherProperty() { //Try adding the MethodDispatcher using the old interface MethodDispatcher md = getMethodDispatcher(); if (getService().get("org.apache.cxf.frontend.MethodDispatcher") == null) { try { Class<?> cls = ClassLoaderUtils.loadClass("org.apache.cxf.frontend.MethodDispatcher", getClass()); Object o = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {cls}, new ReflectionInvokationHandler(md)); getService().put("org.apache.cxf.frontend.MethodDispatcher", o); } catch (Exception ex) { //ignore } } }
private Method getMethodFromOperation(String op) throws Exception { BindingOperationInfo bop = getOperation(op); MethodDispatcher md = (MethodDispatcher)client.getEndpoint() .getService() .get(MethodDispatcher.class.getName()); return md.getMethod(bop); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().getBindingOperationInfo(); MethodDispatcher md = (MethodDispatcher) m.getExchange().getService().get(MethodDispatcher.class.getName()); return md.getMethod(bop); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().get(BindingOperationInfo.class); MethodDispatcher md = (MethodDispatcher) m.getExchange().get(Service.class).get(MethodDispatcher.class.getName()); return md.getMethod(bop); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().getBindingOperationInfo(); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().getService().get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method)m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().getBindingOperationInfo(); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().getService().get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method)m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().get(BindingOperationInfo.class); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().get(Service.class).get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method)m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().getBindingOperationInfo(); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().getService().get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method)m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().get(BindingOperationInfo.class); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().get(Service.class).get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method)m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
@Override public Object invoke(Exchange exchange, Object o) { BindingOperationInfo bop = exchange.get(BindingOperationInfo.class); MethodDispatcher md = (MethodDispatcher) exchange.get(Service.class).get(MethodDispatcher.class.getName()); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } final Method method = adjustMethodAndParams(md.getMethod(bop), exchange, params, targetClass); return invoke(exchange, targetBean, method, params); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().getBindingOperationInfo(); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().getService().get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method)m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
protected Method getTargetMethod(Message m) { BindingOperationInfo bop = m.getExchange().get(BindingOperationInfo.class); if (bop != null) { MethodDispatcher md = (MethodDispatcher) m.getExchange().get(Service.class).get(MethodDispatcher.class.getName()); return md.getMethod(bop); } Method method = (Method) m.get("org.apache.cxf.resource.method"); if (method != null) { return method; } throw new AccessDeniedException("Method is not available : Unauthorized"); }
protected Method getServiceMethod(Message message) { Message inMessage = message.getExchange().getInMessage(); Method method = null; if (inMessage != null) { method = (Method)inMessage.get("org.apache.cxf.resource.method"); if (method == null) { BindingOperationInfo bop = inMessage.getExchange().getBindingOperationInfo(); if (bop != null) { MethodDispatcher md = (MethodDispatcher) inMessage.getExchange().getService().get(MethodDispatcher.class.getName()); method = md.getMethod(bop); } } } if (method == null) { method = message.getExchange().get(Method.class); } return method; }