Examples of MethodDispatcher


Examples of org.apache.cxf.frontend.MethodDispatcher

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

        Endpoint endpoint = getClient().getEndpoint();
        String address = endpoint.getEndpointInfo().getAddress();
        MethodDispatcher dispatcher = (MethodDispatcher)endpoint.getService().get(
                                                                                  MethodDispatcher.class
                                                                                      .getName());
        Object[] params = args;
        if (null == params) {
            params = new Object[0];
        }       
       
        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

Examples of org.apache.cxf.frontend.MethodDispatcher

        BindingOperationInfo boi = camelExchange.getProperty(BindingOperationInfo.class.getName(),
                                                             BindingOperationInfo.class);
        if (boi != null) {
            Service service = (Service)cxfExchange.get(Service.class);
            if (service != null) {
                MethodDispatcher md = (MethodDispatcher)service
                    .get(MethodDispatcher.class.getName());
                if (md != null) {
                    method = md.getMethod(boi);
                }
            }
           
            if (boi.getOperationInfo().isOneWay()) {
                mep = ExchangePattern.InOnly;
View Full Code Here

Examples of org.apache.cxf.frontend.MethodDispatcher

        MessageContentsList params = getParameters(message, op);
        message.setContent(List.class, params);
    }

    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

Examples of org.apache.cxf.frontend.MethodDispatcher

        final Object serviceObject = getServiceObject(exchange);
        try {

            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 = null;
            if (o instanceof List) {
View Full Code Here

Examples of org.apache.cxf.frontend.MethodDispatcher

        BindingOperationInfo boi = camelExchange.getProperty(BindingOperationInfo.class.getName(),
                                                             BindingOperationInfo.class);
        if (boi != null) {
            Service service = (Service)cxfExchange.get(Service.class);
            if (service != null) {
                MethodDispatcher md = (MethodDispatcher)service
                    .get(MethodDispatcher.class.getName());
                if (md != null) {
                    method = md.getMethod(boi);
                }
            }
           
            if (boi.getOperationInfo().isOneWay()) {
                mep = ExchangePattern.InOnly;
View Full Code Here

Examples of org.apache.cxf.frontend.MethodDispatcher

                                           HttpBindingFactory.HTTP_BINDING_ID);
        info.setName(new QName(si.getName().getNamespaceURI(),
                               si.getName().getLocalPart() + "HttpBinding"));
       
        service.put(URIMapper.class.getName(), mapper);
        MethodDispatcher md = (MethodDispatcher) service.get(MethodDispatcher.class.getName());

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

            info.addOperation(bop);
           
            Method m = md.getMethod(bop);
           
            try {
                Class<?> c = (Class) service.get(ReflectionServiceFactoryBean.ENDPOINT_CLASS);
                if (c != null) {
                    m = c.getMethod(m.getName(), m.getParameterTypes());
View Full Code Here

Examples of org.apache.cxf.frontend.MethodDispatcher

    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.
View Full Code Here

Examples of org.apache.cxf.frontend.MethodDispatcher

        }
        return null;
    }

    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

Examples of org.apache.cxf.frontend.MethodDispatcher

        return type;
    }

    private Method getMethod(Service s, OperationInfo op) {
        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.
View Full Code Here

Examples of org.apache.cxf.frontend.MethodDispatcher

        final Object serviceObject = getServiceObject(exchange);
        try {

            BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
            MethodDispatcher md = (MethodDispatcher)
                exchange.get(Service.class).get(MethodDispatcher.class.getName());
            Method m = md.getMethod(bop);
            if (m == null && bop == null) {
                LOG.severe(new Message("MISSING_BINDING_OPERATION", LOG).toString());
                throw new Fault(new Message("EXCEPTION_INVOKING_OBJECT", LOG,
                                             "No binding operation info", "unknown method", "unknown"));
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.