Search in sources :

Example 21 with JavaModel

use of org.apache.cxf.tools.common.model.JavaModel in project cxf by apache.

the class JaxwsSEIGenerator method generate.

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);
        setCommonAttributes();
        doWrite(SEI_TEMPLATE, parseOutputName(intf.getPackageName(), intf.getName()));
        env.put(ToolConstants.SEI_CLASS, intf.getFullClassName());
    }
}
Also used : JavaInterface(org.apache.cxf.tools.common.model.JavaInterface) JavaModel(org.apache.cxf.tools.common.model.JavaModel)

Example 22 with JavaModel

use of org.apache.cxf.tools.common.model.JavaModel in project cxf by apache.

the class SimpleClientGenerator method generate.

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", env.get(ToolConstants.SEI_CLASS));
        setAttributes("address", env.get(ToolConstants.CFG_ADDRESS));
        setCommonAttributes();
        doWrite(CLIENT_TEMPLATE, parseOutputName(intf.getPackageName(), intf.getName() + "Client"));
        env.put(ToolConstants.CLIENT_CLASS, intf.getFullClassName() + "Client");
    }
}
Also used : JavaInterface(org.apache.cxf.tools.common.model.JavaInterface) JavaModel(org.apache.cxf.tools.common.model.JavaModel)

Example 23 with JavaModel

use of org.apache.cxf.tools.common.model.JavaModel in project cxf by apache.

the class SimpleSEIGenerator method generate.

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);
        setCommonAttributes();
        doWrite(SEI_TEMPLATE, parseOutputName(intf.getPackageName(), intf.getName()));
        env.put(ToolConstants.SEI_CLASS, intf.getFullClassName());
    }
}
Also used : JavaInterface(org.apache.cxf.tools.common.model.JavaInterface) JavaModel(org.apache.cxf.tools.common.model.JavaModel)

Example 24 with JavaModel

use of org.apache.cxf.tools.common.model.JavaModel in project cxf by apache.

the class SimpleServerGenerator method generate.

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", env.get(ToolConstants.IMPL_CLASS));
        setAttributes("address", env.get(ToolConstants.CFG_ADDRESS));
        setCommonAttributes();
        doWrite(SERVER_TEMPLATE, parseOutputName(intf.getPackageName(), intf.getName() + "Server"));
        env.put(ToolConstants.SERVER_CLASS, intf.getFullClassName() + "Server");
    }
}
Also used : JavaInterface(org.apache.cxf.tools.common.model.JavaInterface) JavaModel(org.apache.cxf.tools.common.model.JavaModel)

Aggregations

JavaModel (org.apache.cxf.tools.common.model.JavaModel)24 JavaInterface (org.apache.cxf.tools.common.model.JavaInterface)20 QName (javax.xml.namespace.QName)11 ServiceInfo (org.apache.cxf.service.model.ServiceInfo)8 JavaPort (org.apache.cxf.tools.common.model.JavaPort)6 JavaServiceClass (org.apache.cxf.tools.common.model.JavaServiceClass)6 Message (org.apache.cxf.common.i18n.Message)5 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)3 JavaException (org.apache.cxf.tools.common.model.JavaException)3 URISyntaxException (java.net.URISyntaxException)2 List (java.util.List)2 ToolContext (org.apache.cxf.tools.common.ToolContext)2 JAnnotation (org.apache.cxf.tools.common.model.JAnnotation)2 JavaExceptionClass (org.apache.cxf.tools.common.model.JavaExceptionClass)2 JavaField (org.apache.cxf.tools.common.model.JavaField)2 JavaMethod (org.apache.cxf.tools.common.model.JavaMethod)2 AntGenerator (org.apache.cxf.tools.java2wsdl.processor.internal.AntGenerator)2 ClassCollector (org.apache.cxf.tools.util.ClassCollector)2 AbstractGenerator (org.apache.cxf.tools.wsdlto.core.AbstractGenerator)2