Examples of WebServicePortMetaData


Examples of org.apache.tuscany.binding.axis2.util.WebServicePortMetaData

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

Examples of org.apache.tuscany.binding.axis2.util.WebServicePortMetaData

    private AxisService createAxisService(EntryPointContext entryPointContext, WebServiceBinding wsBinding) throws AxisFault {

        String entryPointName = entryPointContext.getName();

        Definition definition = wsBinding.getWSDLDefinition();
        WebServicePortMetaData wsdlPortInfo = new WebServicePortMetaData(definition, wsBinding.getWSDLPort(), null, false);

        // AxisServiceGroup serviceGroup = new AxisServiceGroup(axisConfig);
        // serviceGroup.setServiceGroupName(wsdlPortInfo.getServiceName().getLocalPart());
        // axisConfig.addServiceGroup(serviceGroup);

        WSDL2AxisServiceBuilder builder = new WSDL2AxisServiceBuilder(definition, wsdlPortInfo.getServiceName(), wsdlPortInfo.getPort().getName());
        builder.setServerSide(true);
        AxisService axisService = builder.populateService();

        axisService.setName(entryPointName);
        // axisService.setParent(serviceGroup);
        axisService.setServiceDescription("Tuscany configured AxisService for EntryPoint: '" + entryPointName + '\'');

        TypeHelper typeHelper = wsBinding.getTypeHelper();
        ClassLoader cl = wsBinding.getResourceLoader().getClassLoader();

        Class<?> serviceInterface = entryPointContext.getServiceInterface();

        PortType wsdlPortType = wsdlPortInfo.getPortType();
        for (Object o : wsdlPortType.getOperations()) {
            Operation wsdlOperation = (Operation) o;
            String operationName = wsdlOperation.getName();
            QName operationQN = new QName(definition.getTargetNamespace(), operationName);
            Object entryPointProxy = entryPointContext.getInstance(null);

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

Examples of org.apache.tuscany.binding.axis2.util.WebServicePortMetaData

    public void testCreateOperationInvokers() {
        ExternalWebServiceBuilder builder = new ExternalWebServiceBuilder();

        Port port = definition.getService(SERVICE_NAME).getPort(PORTNAME);
        WebServicePortMetaData wspmd = new WebServicePortMetaData(definition, port, null, false);

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

Examples of org.apache.tuscany.binding.axis2.util.WebServicePortMetaData

        super.stop();
    }

    private AxisService createAxisService(WebServiceBinding wsBinding) throws AxisFault {
        Definition definition = wsBinding.getWSDLDefinition();
        WebServicePortMetaData wsdlPortInfo =
            new WebServicePortMetaData(definition, wsBinding.getWSDLPort(), null, false);

        // TODO investigate if this is 20 wsdl what todo?
        WSDLToAxisServiceBuilder builder =
            new WSDL11ToAxisServiceBuilder(definition, wsdlPortInfo.getServiceName(), wsdlPortInfo.getPort()
                .getName());
        builder.setServerSide(true);
        AxisService axisService = builder.populateService();

        axisService.setName(this.getName());
        axisService.setServiceDescription("Tuscany configured AxisService for service: '" + this.getName()
            + "'");

        // Use the existing WSDL
        Parameter wsdlParam = new Parameter(WSDLConstants.WSDL_4_J_DEFINITION, null);
        wsdlParam.setValue(definition);
        axisService.addParameter(wsdlParam);
        Parameter userWSDL = new Parameter("useOriginalwsdl", "true");
        axisService.addParameter(userWSDL);

        PortType wsdlPortType = wsdlPortInfo.getPortType();
        for (Object o : wsdlPortType.getOperations()) {
            Operation wsdlOperation = (Operation)o;
            String operationName = wsdlOperation.getName();
            QName operationQN = new QName(definition.getTargetNamespace(), operationName);
View Full Code Here

Examples of org.apache.tuscany.binding.axis2.util.WebServicePortMetaData

                          WorkContext workContext) {
        super(theName, (Class<T>)contract.getInterfaceClass(), parent, wireService);
        try {
            Definition wsdlDefinition = wsBinding.getWSDLDefinition();
            wsPortMetaData =
                new WebServicePortMetaData(wsdlDefinition, wsBinding.getWSDLPort(), wsBinding.getURI(), false);
            serviceClient = createServiceClient(wsdlDefinition, wsPortMetaData);
            // this.workContext = workContext;
        } catch (AxisFault e) {
            throw new Axis2BindingRunTimeException(e);
        }
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.