Search in sources :

Example 1 with WSDLToSoapProcessor

use of org.apache.cxf.tools.misc.processor.WSDLToSoapProcessor in project cxf by apache.

the class WSDLToSoap method execute.

public void execute(boolean exitOnFinish) {
    WSDLToSoapProcessor processor = new WSDLToSoapProcessor();
    try {
        super.execute(exitOnFinish);
        if (!hasInfoOption()) {
            ToolContext env = new ToolContext();
            env.setParameters(getParametersMap(getArrayKeys()));
            if (isVerboseOn()) {
                env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
            }
            env.put(ToolConstants.CFG_CMD_ARG, getArgument());
            validate(env);
            setEnvParamDefValues(env);
            processor.setEnvironment(env);
            processor.process();
        }
    } catch (ToolException ex) {
        if (ex.getCause() instanceof BadUsageException) {
            printUsageException(TOOL_NAME, (BadUsageException) ex.getCause());
        }
        err.println();
        err.println("WSDLToSoap Error : " + ex.getMessage());
        if (isVerboseOn()) {
            ex.printStackTrace(err);
        }
    } catch (Exception ex) {
        err.println();
        err.println("WSDLToSoap Error : " + ex.getMessage());
        if (isVerboseOn()) {
            ex.printStackTrace(err);
        }
    } finally {
        tearDown();
    }
}
Also used : BadUsageException(org.apache.cxf.tools.common.toolspec.parser.BadUsageException) ToolContext(org.apache.cxf.tools.common.ToolContext) ToolException(org.apache.cxf.tools.common.ToolException) WSDLToSoapProcessor(org.apache.cxf.tools.misc.processor.WSDLToSoapProcessor) ToolException(org.apache.cxf.tools.common.ToolException) BadUsageException(org.apache.cxf.tools.common.toolspec.parser.BadUsageException)

Aggregations

ToolContext (org.apache.cxf.tools.common.ToolContext)1 ToolException (org.apache.cxf.tools.common.ToolException)1 BadUsageException (org.apache.cxf.tools.common.toolspec.parser.BadUsageException)1 WSDLToSoapProcessor (org.apache.cxf.tools.misc.processor.WSDLToSoapProcessor)1