Package org.apache.cxf.service.factory

Examples of org.apache.cxf.service.factory.MethodDispatcher


        message.getExchange().put(BindingOperationInfo.class, op);
        message.setContent(List.class, getParameters(message, op));
    }

    private Method getMethod(Message message, BindingOperationInfo operation) {       
        MethodDispatcher md = (MethodDispatcher) message.getExchange().
            get(Service.class).get(MethodDispatcher.class.getName());
        return md.getMethod(operation);
    }
View Full Code Here


        info.setName(new QName(getServiceInfo().getName().getNamespaceURI(),
                               getServiceInfo().getName().getLocalPart() + "HttpBinding"));
       
        ReflectionServiceFactoryBean sf = (ReflectionServiceFactoryBean) getServiceFactory();
        Service service = sf.getService();
        MethodDispatcher md = (MethodDispatcher) service.get(MethodDispatcher.class.getName());

        for (OperationInfo o : getServiceInfo().getInterface().getOperations()) {
            BindingOperationInfo bop = info.buildOperation(o.getName(), o.getInputName(), o.getOutputName());

            info.addOperation(bop);
           
            Method m = md.getMethod(bop);
           
            // attempt to map the method to a resource using different strategies
            for (ResourceStrategy s : strategies) {
                // Try different ones until we find one that succeeds
                if (s.map(bop, m, mapper)) {
View Full Code Here

    public Object invoke(Exchange exchange, Object o) {

        final Object serviceObject = getServiceObject(exchange);

        BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
        MethodDispatcher md = (MethodDispatcher)
            exchange.get(Service.class).get(MethodDispatcher.class.getName());
        Method m = md.getMethod(bop);
        //Method m = (Method)bop.getOperationInfo().getProperty(Method.class.getName());
        m = matchMethod(m, serviceObject);
        List<Object> params = CastUtils.cast((List<?>)o);

        return invoke(exchange, serviceObject, m, params);
View Full Code Here

        }   
    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      
        MethodDispatcher dispatcher =
            (MethodDispatcher)endpoint.getService().get(MethodDispatcher.class.getName());
        BindingOperationInfo oi = dispatcher.getBindingOperation(method, endpoint);
        if (oi == null) {
            // check for method on BindingProvider and Object
            if (method.getDeclaringClass().equals(BindingProvider.class)
                || method.getDeclaringClass().equals(BindingProviderImpl.class)
                || method.getDeclaringClass().equals(Object.class)) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.service.factory.MethodDispatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.