Package org.apache.tuscany.binding.axis2

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


        Map<String, Axis2OperationInvoker> invokers = builder.createOperationInvokers(Foo.class, null, getClass().getClassLoader(),wspmd);
        assertNotNull(invokers);
        assertEquals(1, invokers.size());

        Axis2OperationInvoker opInvoker = invokers.get(GET_GREETINGS_QN.getLocalPart());
        assertNotNull(opInvoker);
        assertEquals(GET_GREETINGS_QN, opInvoker.getWSDLOperationName());
    }
View Full Code Here


            if (soapAction != null && soapAction.length() > 1) {
                options.setAction(soapAction);
            }

            QName wsdlOperationQName = new QName(portTypeNS, wsdlOperationName);
            Axis2OperationInvoker invoker = new Axis2OperationInvoker(wsdlOperationQName, options, dataBinding, soapFactory);

            invokers.put(methodName, invoker);
        }

        return invokers;
View Full Code Here

    public void testCreateExternalServiceContextFactory() {
        ExternalWebServiceBuilder builder = new ExternalWebServiceBuilder();
        ExternalService es = createMockExternalService();
        ExternalServiceContextFactory cf = builder.createExternalServiceContextFactory(es);
        assertNotNull(cf);
        Axis2ServiceInvoker si = (Axis2ServiceInvoker) cf.createContext().getHandler();
        assertNotNull(si);
    }
View Full Code Here

        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);

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

            String methodName = m.getName();

            WebServiceOperationMetaData operationMetaData = wsPortMetaData.getOperationMetaData(methodName);
            boolean isWrapped = operationMetaData.isDocLitWrapped();
            List<?> sig = operationMetaData.getOperationSignature();
            SDODataBinding dataBinding = new SDODataBinding(cl, typeHelper, sig.size() > 0 ? (QName) sig.get(0) : null, isWrapped);

            Options options = new Options();
            options.setTo(new EndpointReference(wsPortMetaData.getEndpoint()));
            options.setProperty(MessageContextConstants.CHUNKED, Boolean.FALSE);
View Full Code Here

    /**
     * Create an Axis2 ServiceClient configured for the externalService
     */
    protected ServiceClient createServiceClient(String externalServiceName, Definition wsdlDefinition, WebServicePortMetaData wsPortMetaData) {

        TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator(null, null);
        ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext();

        QName serviceQName = wsPortMetaData.getServiceName();
        String portName = wsPortMetaData.getPortName().getLocalPart();

        ServiceClient serviceClient;
View Full Code Here

     * Create an Axis2 ServiceClient
     */
    private ServiceClient createServiceClient(Definition wsdlDefinition, WebServicePortMetaData wsPortMetaData)
        throws AxisFault {

        TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator();
        ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext();
        QName serviceQName = wsPortMetaData.getServiceName();
        String portName = wsPortMetaData.getPortName().getLocalPart();
        AxisService axisService =
            AxisService.createClientSideAxisService(wsdlDefinition, serviceQName, portName, new Options());
        return new ServiceClient(configurationContext, axisService);
View Full Code Here

        OutboundWire outboundWire = EasyMock.createNiceMock(OutboundWire.class);
        Map<Operation<?>, OutboundInvocationChain> map = new HashMap<Operation<?>, OutboundInvocationChain>();
        EasyMock.expect(outboundWire.getInvocationChains()).andReturn(map).once();
        EasyMock.replay(outboundWire);

        TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator();
        ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext();
        WorkContext workContext = EasyMock.createNiceMock(WorkContext.class);
        EasyMock.replay(workContext);
        Axis2Service axis2Service =
            new Axis2Service(serviceName,
                contract,
View Full Code Here

        try {
            if (tccl != scl) {
                Thread.currentThread().setContextClassLoader(scl);
            }
            try {
                this.configContext = new TuscanyAxisConfigurator().getConfigurationContext();
            } catch (AxisFault e) {
                throw new BuilderConfigException(e);
            }
        } finally {
            if (tccl != scl) {
View Full Code Here

TOP

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

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.