Package org.apache.cxf.frontend

Examples of org.apache.cxf.frontend.MethodDispatcher


        return type;
    }

    private Method getMethod(Service s, OperationInfo op) {
        MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName());
        SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md;
        return smd.getPrimaryMethod(op);
    }
View Full Code Here


        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

     * @return
     */
    protected Method getTargetMethod(Message message) {
        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
        if (bop != null) {
            MethodDispatcher md = (MethodDispatcher)
                    message.getExchange().get(Service.class).get(MethodDispatcher.class.getName());
            return md.getMethod(bop);
        }
        Method method = (Method) message.get("org.apache.cxf.resource.method");
        if (method != null) {
            return method;
        }
View Full Code Here

        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

           
            BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
            Service svc = exchange.get(Service.class);
            if (!cxfMmessageProcessor.isProxy())
            {
                MethodDispatcher md = (MethodDispatcher) svc.get(MethodDispatcher.class.getName());
                Method m = md.getMethod(bop);
                if (targetClass != null)
                {
                    m = matchMethod(m, targetClass);
                }
           
View Full Code Here

    }

    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);
    }
View Full Code Here

        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 = bop == null ? null : 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

    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(Object.class)) {
                try {
View Full Code Here

    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

        CxfExchange cxfExchange = endpoint.createExchange(exchange.getInMessage());
        cxfExchange.setProperty(CxfConstants.DATA_FORMAT_PROPERTY, dataFormat);  

        BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
        MethodDispatcher md = (MethodDispatcher)
            exchange.get(Service.class).get(MethodDispatcher.class.getName());
        Method m = md.getMethod(bop);
        cxfExchange.setProperty(BindingOperationInfo.class.toString(), bop);

        // The SEI could be the provider class which will not have the bop information.
        if (bop != null && bop.getOperationInfo().isOneWay()) {
            cxfExchange.setPattern(ExchangePattern.InOnly);
View Full Code Here

TOP

Related Classes of org.apache.cxf.frontend.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.