Package org.apache.tuscany.binding.axis2

Examples of org.apache.tuscany.binding.axis2.Axis2CallbackInvocationHandler


    }

    public Object invokeTarget(final Object payload) throws InvocationTargetException {
        try {
            // Use current correlation id as index to retrieve inv context
            InvocationContext invCtx = service.retrieveMapping(this.currentCorrelationId);

            MessageContext outMC = Utils.createOutMessageContext(invCtx.inMessageContext);
            outMC.getOperationContext().addMessageContext(outMC);
           
            OMElement responseOM = null;
View Full Code Here


            MessageId messageId = new MessageId();
            workContext.setCurrentMessageId(messageId);
            // Now use message id as index to context to be used by callback
            // target invoker
            CountDownLatch doneSignal = new CountDownLatch(1);
            InvocationContext invCtx =
                service.new InvocationContext(messageCtx, operation, getSOAPFactory(messageCtx), doneSignal);
            service.addMapping(messageId, invCtx);

            invokeBusinessLogic(messageCtx);
           
            try {
View Full Code Here

    public void setTomcatHost(ServletHost tomcatHost) {
        this.tomcatHost = tomcatHost;
    }

    protected EntryPointContextFactory createEntryPointContextFactory(EntryPoint entryPoint, MessageFactory msgFactory) {
        WebServiceBinding wsBinding = (WebServiceBinding) entryPoint.getBindings().get(0);
        return new WSEntryPointContextFactory(entryPoint.getName(), messageFactory, tomcatHost, wsBinding);
    }
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    public WebServiceBinding load(XMLStreamReader reader, LoaderContext loaderContext) throws XMLStreamException, ConfigurationLoadException {

        WebServiceBinding binding = WS_FACTORY.createWebServiceBinding();
        binding.setURI(reader.getAttributeValue(null, "uri"));
        binding.setPortURI(reader.getAttributeValue(null, "port"));
        binding.setTypeHelper(registry.getContext().getTypeHelper());
        binding.setWebAppName(registry.getContext().getWebAppName());
        binding.setResourceLoader(loaderContext.getResourceLoader());
        return binding;
    }
View Full Code Here

        };
        return es;
    }

    private Binding createMockBinding() {
        WebServiceBinding b = new WebServiceBinding() {

            public void setPortURI(String portURI) {

            }
View Full Code Here

     * @see org.apache.tuscany.core.extension.ExternalServiceBuilderSupport#createExternalServiceContextFactory(org.apache.tuscany.model.assembly.ExternalService)
     */
    @Override
    protected ExternalServiceContextFactory createExternalServiceContextFactory(ExternalService externalService) {

        WebServiceBinding wsBinding = (WebServiceBinding) externalService.getBindings().get(0);
        Definition wsdlDefinition = wsBinding.getWSDLDefinition();
        WebServicePortMetaData wsPortMetaData = new WebServicePortMetaData(wsdlDefinition, wsBinding.getWSDLPort(), wsBinding.getURI(), false);

        ServiceClient serviceClient = createServiceClient(externalService.getName(), wsdlDefinition, wsPortMetaData);

        TypeHelper typeHelper = wsBinding.getTypeHelper();
        ClassLoader cl = wsBinding.getResourceLoader().getClassLoader();
        Class serviceInterface = externalService.getConfiguredService().getPort().getServiceContract().getInterface();
        Map<String, Axis2OperationInvoker> invokers = createOperationInvokers(serviceInterface, typeHelper, cl, wsPortMetaData);

        Axis2ServiceInvoker axis2Client = new Axis2ServiceInvoker(serviceClient, invokers);

View Full Code Here

        this.tomcatHost = tomcatHost;
    }

    protected EntryPointContextFactory createEntryPointContextFactory(EntryPoint entryPoint, MessageFactory msgFactory) {
        WebServiceBinding wsBinding = (WebServiceBinding) entryPoint.getBindings().get(0);
        return new WSEntryPointContextFactory(entryPoint.getName(), messageFactory, tomcatHost, wsBinding);
    }
View Full Code Here

        Class serviceInterface = externalService.getConfiguredService().getPort().getServiceContract().getInterface();
        Map<String, Axis2OperationInvoker> invokers = createOperationInvokers(serviceInterface, typeHelper, cl, wsPortMetaData);

        Axis2ServiceInvoker axis2Client = new Axis2ServiceInvoker(serviceClient, invokers);

        return new WSExternalServiceContextFactory(externalService.getName(), new SingletonObjectFactory<Axis2ServiceInvoker>(axis2Client));

    }
View Full Code Here

            WebServiceOperationMetaData omd = wsdlPortInfo.getOperationMetaData(operationName);
            QName responseTypeQN = omd.getOutputPart(0).getElementName();

            Method operationMethod = getMethod(serviceInterface, operationName);
            SDODataBinding dataBinding = new SDODataBinding(cl, typeHelper, responseTypeQN, omd.isDocLitWrapped());
            WebServiceEntryPointInOutSyncMessageReceiver msgrec = new WebServiceEntryPointInOutSyncMessageReceiver(entryPointProxy, operationMethod,
                    dataBinding, cl);

            AxisOperation axisOp = axisService.getOperation(operationQN);
            axisOp.setMessageExchangePattern(WSDLConstants.MEP_URI_IN_OUT);
            axisOp.setMessageReceiver(msgrec);
View Full Code Here

        try {
            axisService = createAxisService(epc, wsBinding);
        } catch (AxisFault e) {
            throw new BuilderConfigException(e);
        }
        WebServiceEntryPointServlet servlet = new WebServiceEntryPointServlet(axisService);
        ServletConfig sc = createDummyServletConfig();
        try {
            servlet.init(sc );
        } catch (ServletException e) {
            throw new BuilderConfigException(e);
        }

        String servletMapping = wsBinding.getWebAppName() + "/services/" + epc.getName();
View Full Code Here

TOP

Related Classes of org.apache.tuscany.binding.axis2.Axis2CallbackInvocationHandler

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.