Package org.apache.tuscany.sca.runtime

Examples of org.apache.tuscany.sca.runtime.RuntimeWire.invoke()


        RuntimeWire wire = componentService.getRuntimeWire(binding, serviceContract);
        Operation jsonOperation = findOperation(method);
        Object result = null;
        JSONObject jsonResponse = new JSONObject();
        try {
            result = wire.invoke(jsonOperation, args);
            try {
                jsonResponse.put("result", result);
                jsonResponse.putOpt("id", id);
            } catch (Exception e) {
                throw new ServiceRuntimeException(e);
View Full Code Here


            parameters.setConversationID(conversationID);
        }

        // find the runtime wire and invoke it with the message
        RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding());
        return wire.invoke(op, msg);
    }

    public boolean isConversational() {
        return wsBinding.getBindingInterfaceContract().getInterface().isConversational();
    }
View Full Code Here

        // Mock up getting and invoking the RuntimeWire. It is going to call:
        // service.getRuntimeWire(jmsBinding).invoke(operation, (Object[])requestPayload);
        final RuntimeWire runtimeWire = EasyMock.createStrictMock(RuntimeWire.class);
        EasyMock.expect(service.getRuntimeWire(jmsBinding)).andReturn(runtimeWire);
        EasyMock.expect(runtimeWire.invoke(expectedOperation, new Object[] {operationParams}))
            .andReturn(operationReturnValue);

        // Create the JMS Binding Listener
        final JMSBindingListener bindingListener = new JMSBindingListener(jmsBinding, jmsResourceFactory, service);
View Full Code Here

        Class<?> type = ((JavaInterface)rcs.getInterfaceContract().getInterface()).getJavaClass();
        Object proxy = Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                RuntimeWire wire = rcs.getRuntimeWire(binding);
                Operation op = JavaInterfaceUtil.findOperation(method, rcs.getInterfaceContract().getInterface().getOperations());
                return wire.invoke(op, args);
            }});

        servlet.addService(binding.getName(), type, proxy);
    }
View Full Code Here

            Axis2BindingBasicAuthenticationConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy);
        }
       
        // find the runtime wire and invoke it with the message
        RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding());
        Object response =  wire.invoke(op, msg);
       
        for ( PolicyHandler policyHandler : policyHandlerList ) {
            policyHandler.afterInvoke(response, inMC);
        }       
       
View Full Code Here

            Axis2BindingBasicAuthenticationConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy);
        }
       
        // find the runtime wire and invoke it with the message
        RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding());
        Object response =  wire.invoke(op, msg);
       
        return response;
    }

    public boolean isConversational() {
View Full Code Here

            parameters.setConversationID(conversationID);
        }

        // find the runtime wire and invoke it with the message
        RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding());
        return wire.invoke(op, msg);
    }

    public boolean isConversational() {
        return wsBinding.getBindingInterfaceContract().getInterface().isConversational();
    }
View Full Code Here

        Class<?> type = ((JavaInterface)rcs.getInterfaceContract().getInterface()).getJavaClass();
        Object proxy = Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                RuntimeWire wire = rcs.getRuntimeWire(binding);
                Operation op = JavaInterfaceUtil.findOperation(method, rcs.getInterfaceContract().getInterface().getOperations());
                return wire.invoke(op, args);
            }});

        servlet.addService(binding.getName(), type, proxy);
    }
View Full Code Here

                                    Object result = null;
                                    boolean success = false;

                                    try {
                                        result = runtimeWire.invoke(operation, args);
                                        success = true;
                                    } catch (Exception e) {
                                        partnerRoleMessageExchange.replyWithFailure(MessageExchange.FailureType.OTHER,
                                                                                    e.getMessage(),
                                                                                    null);
View Full Code Here

            Axis2BindingBasicAuthenticationConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy);
        }
       
        // find the runtime wire and invoke it with the message
        RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding());
        Object response =  wire.invoke(op, msg);
       
        for ( PolicyHandler policyHandler : policyHandlerList ) {
            policyHandler.afterInvoke(response, inMC);
        }       
       
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.