Examples of JavaPort


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

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

        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

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

            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
        JavaServiceClass js = null;
        JavaPort jp = null;

        for (Iterator iter = interfaces.keySet().iterator(); iter.hasNext();) {
            String interfaceName = (String)iter.next();
            JavaInterface intf = interfaces.get(interfaceName);

            Iterator it = javaModel.getServiceClasses().values().iterator();
            while (it.hasNext()) {
                String serviceName = "";
                js = (JavaServiceClass)it.next();
                Iterator i = js.getPorts().iterator();
                while (i.hasNext()) {
                    jp = (JavaPort)i.next();
                    if (jp.getPortType().equals(interfaceName)) {
                        serviceName = js.getName();

                        break;
                    }
                }
View Full Code Here

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

            Iterator it = javaModel.getServiceClasses().values().iterator();
            while (it.hasNext()) {
                JavaServiceClass js = (JavaServiceClass)it.next();
                Iterator i = js.getPorts().iterator();
                while (i.hasNext()) {
                    JavaPort jp = (JavaPort)i.next();
                    if (interfaceName.equals(jp.getPortType())) {
                        address = jp.getBindingAdress();
                        break;
                    }
                }
                if (!"".equals(address)) {
                    break;
View Full Code Here

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

        if (!services.values().isEmpty()) {
            JavaServiceClass javaservice = services.values().iterator().next();
            service = javaservice;
          
            if (javaservice.getPorts().size() != 0) {
                JavaPort jport = (JavaPort)javaservice.getPorts().get(0);
                port = jport.getPortName();
            }
        }
        for (Iterator iter = interfaces.keySet().iterator(); iter.hasNext();) {
            String interfaceName = (String)iter.next();
            JavaInterface intf = interfaces.get(interfaceName);
View Full Code Here

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);
        }
        model.addServiceClass(name, sclz);
    }
View Full Code Here

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

        }
        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.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

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);
        }
        model.addServiceClass(name, sclz);
    }
View Full Code Here

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

        }
        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

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

        if (!services.values().isEmpty()) {
            JavaServiceClass javaservice = services.values().iterator().next();
            service = javaservice;
          
            if (javaservice.getPorts().size() != 0) {
                JavaPort jport = (JavaPort)javaservice.getPorts().get(0);
                port = jport.getPortName();
            }
        }
        for (Iterator iter = interfaces.keySet().iterator(); iter.hasNext();) {
            String interfaceName = (String)iter.next();
            JavaInterface intf = interfaces.get(interfaceName);
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.