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

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


    }

    public void generate(ToolContext penv) throws ToolException {

        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("implClass", ((Class)env.get(ToolConstants.IMPL_CLASS)).getName());
View Full Code Here


    public void process() throws ToolException {
        checkJaxwsClass();
        List<ServiceInfo> services = (List<ServiceInfo>)context.get(ToolConstants.SERVICE_LIST);
        ServiceInfo serviceInfo = services.get(0);
        JavaInterface jinf = JavaFirstUtil.serviceInfo2JavaInf(serviceInfo);
        JavaModel jm = new JavaModel();
        jm.addInterface("inf", jinf);
        jinf.setJavaModel(jm);
        context.put(JavaModel.class, jm);
        context.put(ToolConstants.SERVICE_NAME, serviceInfo.getName());
        EndpointInfo endpointInfo = serviceInfo.getEndpoints().iterator().next();
        context.put(ToolConstants.PORT_NAME, endpointInfo.getName());
View Full Code Here

    }

    public void generate(ToolContext penv) throws ToolException {

        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("address", "http://localhost:9090/hello");
View Full Code Here

        return true;
    }

    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);

        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
        QName service = (QName)env.get(ToolConstants.SERVICE_NAME);
        QName port = (QName)env.get(ToolConstants.PORT_NAME);
        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
View Full Code Here

    }


    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }
       
        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("seiClass", ((Class)env.get(ToolConstants.SEI_CLASS)).getName());
View Full Code Here

    }

    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);

        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        if (interfaces.size() == 0) {
            ServiceInfo serviceInfo = (ServiceInfo)env.get(ServiceInfo.class);
            String wsdl = serviceInfo.getDescription().getBaseURI();
            Message msg = new Message("CAN_NOT_GEN_SEI", LOG, wsdl);
View Full Code Here

        return false;
    }

    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);

        if (passthrough()) {
            return;
        }

        Map<String, JavaServiceClass> serviceClasses = javaModel.getServiceClasses();
       
        if (serviceClasses.size() == 0) {
            ServiceInfo serviceInfo = (ServiceInfo)env.get(ServiceInfo.class);
            String wsdl = serviceInfo.getDescription().getBaseURI();
            Message msg = new Message("CAN_NOT_GEN_SERVICE", LOG, wsdl);
View Full Code Here

        return false;
    }

    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);

        if (passthrough()) {
            return;
        }

        Map<String, JavaServiceClass> serviceClasses = javaModel.getServiceClasses();
       
        if (serviceClasses.size() == 0) {
            ServiceInfo serviceInfo = (ServiceInfo)env.get(ServiceInfo.class);
            String wsdl = serviceInfo.getDescription().getBaseURI();
            Message msg = new Message("CAN_NOT_GEN_SERVICE", LOG, wsdl);
View Full Code Here

   
    public void process() throws ToolException {
        super.process();

        JavaModel jmodel = wsdlDefinitionToJavaModel(context.get(ServiceInfo.class));

        if (jmodel == null) {
            Message msg = new Message("FAIL_TO_CREATE_JAVA_MODEL", LOG);
            throw new ToolException(msg);
        }
View Full Code Here

        }
        context.setJavaModel(jmodel);
    }

    private JavaModel wsdlDefinitionToJavaModel(ServiceInfo serviceInfo) throws ToolException {
        JavaModel javaModel = null;
        Map<QName, JavaModel> map = CastUtils.cast((Map)context.get(MODEL_MAP));
        if (map == null) {
            map = new HashMap<QName, JavaModel>();
            context.put(MODEL_MAP, map);
        }
        if (map.containsKey(serviceInfo.getName())) {
            javaModel = map.get(serviceInfo.getName());
        } else {
            javaModel = new JavaModel();
            map.put(serviceInfo.getName(), javaModel);
        }
        context.put(JavaModel.class, javaModel);
       
        List<JavaInterface> interfaces = new ArrayList<JavaInterface>();
        interfaces.addAll(javaModel.getInterfaces().values());
       
        PortTypeProcessor portTypeProcessor = new PortTypeProcessor(context);
        portTypeProcessor.process(serviceInfo);

        ServiceProcessor serviceProcessor = new ServiceProcessor(context);
        serviceProcessor.process(serviceInfo);
       
        for (JavaInterface intf : javaModel.getInterfaces().values()) {
            if (!interfaces.contains(intf)) {
                intf.annotate(new WebServiceAnnotator());
                intf.annotate(new BindingAnnotator());
            }
        }
View Full Code Here

TOP

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

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.