Search in sources :

Example 1 with JaxwsImplGenerator

use of org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsImplGenerator in project cxf by apache.

the class JAXWSFrontEndProcessor method process.

@SuppressWarnings("unchecked")
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);
    String className = (String) context.get(ToolConstants.IMPL_CLASS);
    if (className != null && className.equals(jinf.getFullClassName())) {
        jinf.setName(jinf.getName() + SEI_SUFFIX);
    }
    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());
    generators.add(new JaxwsSEIGenerator());
    generators.add(new JaxwsImplGenerator());
    generators.add(new JaxwsServerGenerator());
    generators.add(new JaxwsClientGenerator());
    generators.add(new AntGenerator());
    for (AbstractGenerator generator : generators) {
        generator.generate(context);
    }
}
Also used : JavaInterface(org.apache.cxf.tools.common.model.JavaInterface) JaxwsServerGenerator(org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsServerGenerator) AbstractGenerator(org.apache.cxf.tools.wsdlto.core.AbstractGenerator) JaxwsImplGenerator(org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsImplGenerator) JaxwsClientGenerator(org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsClientGenerator) ServiceInfo(org.apache.cxf.service.model.ServiceInfo) EndpointInfo(org.apache.cxf.service.model.EndpointInfo) JaxwsSEIGenerator(org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsSEIGenerator) JavaModel(org.apache.cxf.tools.common.model.JavaModel) ArrayList(java.util.ArrayList) List(java.util.List) AntGenerator(org.apache.cxf.tools.java2wsdl.processor.internal.AntGenerator)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)1 ServiceInfo (org.apache.cxf.service.model.ServiceInfo)1 JavaInterface (org.apache.cxf.tools.common.model.JavaInterface)1 JavaModel (org.apache.cxf.tools.common.model.JavaModel)1 AntGenerator (org.apache.cxf.tools.java2wsdl.processor.internal.AntGenerator)1 JaxwsClientGenerator (org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsClientGenerator)1 JaxwsImplGenerator (org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsImplGenerator)1 JaxwsSEIGenerator (org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsSEIGenerator)1 JaxwsServerGenerator (org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.generator.JaxwsServerGenerator)1 AbstractGenerator (org.apache.cxf.tools.wsdlto.core.AbstractGenerator)1