Package org.apache.cxf.tools.common.model

Examples of org.apache.cxf.tools.common.model.JavaPort



        Collection<EndpointInfo> ports = service.getEndpoints();

        for (EndpointInfo port : ports) {
            JavaPort javaport = processPort(model, port);
            sclz.addPort(javaport);
        }
       
        sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
        model.addServiceClass(name, sclz);
View Full Code Here


        sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
        model.addServiceClass(name, sclz);
    }

    private JavaPort processPort(JavaModel model, EndpointInfo port) throws ToolException {
        JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
        jport.setPortName(port.getName().getLocalPart());
        BindingInfo binding = port.getBinding();
        jport.setBindingAdress(port.getAddress());
        jport.setBindingName(binding.getName().getLocalPart());

        String namespace = binding.getInterface().getName().getNamespaceURI();
        String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
        jport.setPackageName(packageName);

        InterfaceInfo infInfo = binding.getInterface();

        String portType = binding.getInterface().getName().getLocalPart();
        jport.setPortType(portType);

        JAXWSBinding infBinding = infInfo.getExtensor(JAXWSBinding.class);

        if (infBinding != null) {
            if (infBinding.getJaxwsClass() != null
                && !StringUtils.isEmpty(infBinding.getJaxwsClass().getClassName())) {
                jport.setPortType(infBinding.getJaxwsClass().getClassName());
                jaxwsBinding.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
            }

            if (!infBinding.isEnableAsyncMapping()) {
                jaxwsBinding.setEnableAsyncMapping(false);
            }
            if (!infBinding.isEnableWrapperStyle()) {
                jaxwsBinding.setEnableWrapperStyle(false);
            }

            if (infBinding.getPackage() != null) {
                jaxwsBinding.setPackage(infBinding.getPackage());
            }
           
            if (!infBinding.getPackageJavaDoc().equals("")) {
                jaxwsBinding.setPackageJavaDoc(infBinding.getPackageJavaDoc());
            }
        }

        if (jaxwsBinding.getPackage() != null) {
            jport.setPackageName(jaxwsBinding.getPackage());
        }

        if (infBinding != null && infBinding.getJaxwsClass() != null
            && infBinding.getJaxwsClass().getClassName() != null) {
            String className = NameUtil.mangleNameToClassName(infBinding.getJaxwsClass().getClassName());
            jport.setInterfaceClass(className);
        } else {
            jport.setInterfaceClass(NameUtil.mangleNameToClassName(portType));
        }

        bindingType = getBindingType(binding);

        if (bindingType == null) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
                                                       LOG,
                                                       binding.getName());
            throw new ToolException(msg);
        }

        if (isSoapBinding()) {
            SoapBinding spbd = SOAPBindingUtil.getProxy(SoapBinding.class, this.bindingObj);
            jport.setStyle(SOAPBindingUtil.getSoapStyle(spbd.getStyle()));
            jport.setTransURI(spbd.getTransportURI());
        }

        Collection<BindingOperationInfo> operations = binding.getOperations();
        for (BindingOperationInfo bop : operations) {
            processOperation(model, bop, binding);
View Full Code Here

        }

        Collection<EndpointInfo> ports = service.getEndpoints();

        for (EndpointInfo port : ports) {
            JavaPort javaport = processPort(model, service, port);
            sclz.addPort(javaport);
        }
       
        sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
        model.addServiceClass(sclz.getName(), sclz);
View Full Code Here

    private JavaPort processPort(JavaModel model, ServiceInfo si, EndpointInfo port) throws ToolException {
        BindingInfo binding = port.getBinding();
        String portType = binding.getInterface().getName().getLocalPart();
        JavaInterface intf = PortTypeProcessor.getInterface(context, si, binding.getInterface());
        JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
        jport.setPackageName(intf.getPackageName());
       
        jport.setPortName(port.getName().getLocalPart());
        jport.setBindingAdress(port.getAddress());
        jport.setBindingName(binding.getName().getLocalPart());


        jport.setPortType(portType);


        jport.setInterfaceClass(intf.getName());
        bindingType = getBindingType(binding);

        if (bindingType == null) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
                                                       LOG,
                                                       binding.getName());
            throw new ToolException(msg);
        }

        if (isSoapBinding()) {
            SoapBinding spbd = SOAPBindingUtil.getProxy(SoapBinding.class, this.bindingObj);
            jport.setStyle(SOAPBindingUtil.getSoapStyle(spbd.getStyle()));
            jport.setTransURI(spbd.getTransportURI());
        }

        Collection<BindingOperationInfo> operations = binding.getOperations();
        for (BindingOperationInfo bop : operations) {
            processOperation(model, bop, binding);
View Full Code Here


        Collection<EndpointInfo> ports = service.getEndpoints();

        for (EndpointInfo port : ports) {
            JavaPort javaport = processPort(model, port);
            sclz.addPort(javaport);
        }
        model.addServiceClass(name, sclz);
    }
View Full Code Here

        }
        model.addServiceClass(name, sclz);
    }

    private JavaPort processPort(JavaModel model, EndpointInfo port) throws ToolException {
        JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
        jport.setPortName(port.getName().getLocalPart());
        BindingInfo binding = port.getBinding();
        jport.setBindingAdress(port.getAddress());
        jport.setBindingName(binding.getName().getLocalPart());

        String namespace = binding.getInterface().getName().getNamespaceURI();
        String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
        jport.setPackageName(packageName);

        InterfaceInfo infInfo = binding.getInterface();

        String portType = binding.getInterface().getName().getLocalPart();
        jport.setPortType(portType);

        JAXWSBinding infBinding = infInfo.getExtensor(JAXWSBinding.class);

        if (infBinding != null) {
            if (infBinding.getJaxwsClass() != null
                && !StringUtils.isEmpty(infBinding.getJaxwsClass().getClassName())) {
                jport.setPortType(infBinding.getJaxwsClass().getClassName());
            }

            if (!infBinding.isEnableAsyncMapping()) {
                jaxwsBinding.setEnableAsyncMapping(false);
            }
            if (!infBinding.isEnableWrapperStyle()) {
                jaxwsBinding.setEnableWrapperStyle(false);
            }

            if (infBinding.getPackage() != null) {
                jaxwsBinding.setPackage(infBinding.getPackage());
            }
        }

        if (jaxwsBinding.getPackage() != null) {
            jport.setPackageName(jaxwsBinding.getPackage());
        }

        if (infBinding != null && infBinding.getJaxwsClass() != null
            && infBinding.getJaxwsClass().getClassName() != null) {
            String className = NameUtil.mangleNameToClassName(infBinding.getJaxwsClass().getClassName());
            jport.setInterfaceClass(className);
        } else {
            jport.setInterfaceClass(NameUtil.mangleNameToClassName(portType));
        }

        bindingType = getBindingType(binding);

        if (bindingType == null) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
                                                       LOG,
                                                       binding.getName());
            throw new ToolException(msg);
        }

        if (isSoapBinding()) {
            SoapBinding spbd = SOAPBindingUtil.getProxy(SoapBinding.class, this.bindingObj);
            jport.setStyle(SOAPBindingUtil.getSoapStyle(spbd.getStyle()));
            jport.setTransURI(spbd.getTransportURI());
        }

        Collection<BindingOperationInfo> operations = binding.getOperations();
        for (BindingOperationInfo bop : operations) {
            processOperation(model, bop, binding);
View Full Code Here

        }

        Collection<EndpointInfo> ports = service.getEndpoints();

        for (EndpointInfo port : ports) {
            JavaPort javaport = processPort(model, service, port);
            sclz.addPort(javaport);
        }
       
        sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
        model.addServiceClass(sclz.getName(), sclz);
View Full Code Here

    private JavaPort processPort(JavaModel model, ServiceInfo si, EndpointInfo port) throws ToolException {
        BindingInfo binding = port.getBinding();
        String portType = binding.getInterface().getName().getLocalPart();
        JavaInterface intf = PortTypeProcessor.getInterface(context, si, binding.getInterface());
        JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
        jport.setPackageName(intf.getPackageName());
       
        jport.setPortName(port.getName().getLocalPart());
        jport.setBindingAdress(port.getAddress());
        jport.setBindingName(binding.getName().getLocalPart());


        jport.setPortType(portType);


        jport.setInterfaceClass(intf.getName());
        bindingType = getBindingType(binding);

        if (bindingType == null) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
                                                       LOG,
                                                       binding.getName());
            throw new ToolException(msg);
        }

        if (isSoapBinding()) {
            SoapBinding spbd = SOAPBindingUtil.getProxy(SoapBinding.class, this.bindingObj);
            jport.setStyle(SOAPBindingUtil.getSoapStyle(spbd.getStyle()));
            jport.setTransURI(spbd.getTransportURI());
        }

        Collection<BindingOperationInfo> operations = binding.getOperations();
        for (BindingOperationInfo bop : operations) {
            processOperation(model, bop, binding);
View Full Code Here

        }

        Collection<EndpointInfo> ports = service.getEndpoints();

        for (EndpointInfo port : ports) {
            JavaPort javaport = processPort(model, service, port);
            sclz.addPort(javaport);
        }
       
        sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
        model.addServiceClass(sclz.getName(), sclz);
View Full Code Here

    private JavaPort processPort(JavaModel model, ServiceInfo si, EndpointInfo port) throws ToolException {
        BindingInfo binding = port.getBinding();
        String portType = binding.getInterface().getName().getLocalPart();
        JavaInterface intf = PortTypeProcessor.getInterface(context, si, binding.getInterface());
        JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
        jport.setPackageName(intf.getPackageName());
       
        jport.setPortName(port.getName().getLocalPart());
        jport.setBindingAdress(port.getAddress());
        jport.setBindingName(binding.getName().getLocalPart());


        jport.setPortType(portType);


        jport.setInterfaceClass(intf.getName());
        bindingType = getBindingType(binding);

        if (bindingType == null) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
                                                       LOG,
                                                       binding.getName());
            throw new ToolException(msg);
        }

        if (isSoapBinding()) {
            SoapBinding spbd = SOAPBindingUtil.getProxy(SoapBinding.class, this.bindingObj);
            jport.setStyle(SOAPBindingUtil.getSoapStyle(spbd.getStyle()));
            jport.setTransURI(spbd.getTransportURI());
        }

        Collection<BindingOperationInfo> operations = binding.getOperations();
        for (BindingOperationInfo bop : operations) {
            processOperation(model, bop, binding);
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.model.JavaPort

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.