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


       
        Service serviceClass = EasyMock.createMock(Service.class);
        ex.get(Service.class);
        EasyMock.expectLastCall().andReturn(serviceClass);
       
        MethodDispatcher md = EasyMock.createMock(MethodDispatcher.class);
        serviceClass.get(MethodDispatcher.class.getName());
        EasyMock.expectLastCall().andReturn(md);
       
        md.getMethod(boi);
        EasyMock.expectLastCall().andReturn(
            ContinuationService.class.getMethod("invoke", new Class[]{}));
       
        EasyMock.replay(ex);
        EasyMock.replay(md);
View Full Code Here

                                           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

    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

            throw new IllegalStateException("The client has been closed.");
        }

        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)
                || method.getDeclaringClass().equals(Closeable.class)) {
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

    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

            throw new IllegalStateException("The client has been closed.");
        }

        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)
                || method.getDeclaringClass().equals(Closeable.class)) {
View Full Code Here


    // TODO: The method containing the actual annotations have to retrieved
    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);
    }
View Full Code Here

                                           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

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.