Package org.apache.cxf.tools.common

Examples of org.apache.cxf.tools.common.ToolContext


    // just run with a minimum of fuss.
    @Test
    public void testGeneration() throws Exception {
        JavaScriptContainer container = new JavaScriptContainer(null);

        ToolContext context = new ToolContext();
        context.put(ToolConstants.CFG_WSDLURL, getLocation("hello_world.wsdl"));
        context.put(ToolConstants.CFG_OUTPUTDIR, output.toString());
        String[] prefixes = new String[1];
        prefixes[0] = "http://apache.org/hello_world_soap_http=murble";
        context.put(ToolConstants.CFG_JSPACKAGEPREFIX, prefixes);
        container.setContext(context);
        container.execute();
        // now we really want to check some results.
        File resultFile = new File(output, "SOAPService_Test1.js");
        assertTrue(resultFile.canRead());
View Full Code Here


  
    @Test
    public void testCXF3891() throws Exception {
        JavaScriptContainer container = new JavaScriptContainer(null);

        ToolContext context = new ToolContext();
        context.put(ToolConstants.CFG_WSDLURL, getLocation("hello_world_ref.wsdl"));
        context.put(ToolConstants.CFG_OUTPUTDIR, output.toString());
        String[] prefixes = new String[1];
        prefixes[0] = "http://apache.org/hello_world_soap_http=murble";
        context.put(ToolConstants.CFG_JSPACKAGEPREFIX, prefixes);
        container.setContext(context);
        container.execute();
        // now we really want to check some results.
        File resultFile = new File(output, "SOAPService.js");
        assertTrue(resultFile.canRead());
View Full Code Here

            return true;
        }
        return false;
    }
    private boolean isValidOperation(OperationInfo operation) {
        ToolContext context = service.getProperty(ToolContext.class.getName(), ToolContext.class);
       
        boolean c = context.optionSet(ToolConstants.CFG_AUTORESOLVE);

        boolean valid = false;
        if (operation.getUnwrappedOperation() == null) {
            valid = true;
        }
View Full Code Here

import org.junit.Test;

public class ParameterProcessorTest extends Assert {
    @Test
    public void testAddParameter() throws Exception {
        ParameterProcessor processor = new ParameterProcessor(new ToolContext());

        JavaMethod method = new JavaMethod();
        JavaParameter p1 = new JavaParameter("request", String.class.getName(), null);
        p1.setStyle(JavaType.Style.IN);
        processor.addParameter(null, method, p1);
View Full Code Here

public class JAXWSDefinitionBuilderTest extends Assert {
    private ToolContext env;

    @Before
    public void setUp() {
        env = new ToolContext();
    }
View Full Code Here

    @Test
    public void testKeep() throws Exception {
        gen = new DummyGenerator();
        util = new FileWriterUtil(output.toString());

        context = new ToolContext();
        context.put(ToolConstants.CFG_OUTPUTDIR, output.toString());
        gen.setEnvironment(context);

        Writer writer = util.getWriter(packageName, className + ".java");
        writer.write("hello world");
View Full Code Here

    @Test
    public void testOverwrite() throws Exception {
        gen = new DummyGenerator();
        util = new FileWriterUtil(output.toString());

        context = new ToolContext();
        context.put(ToolConstants.CFG_OUTPUTDIR, output.toString());

        gen.setEnvironment(context);

        Writer writer = util.getWriter(packageName, className + ".java");
View Full Code Here

            if (bus == null) {
                bus = BusFactory.newInstance().createBus();
                BusFactory.setThreadDefaultBus(bus);
            }
            try {
                new WSDLToJava(args).run(new ToolContext());
            } catch (Throwable e) {
                getLog().debug(e);
                throw new MojoExecutionException(e.getMessage(), e);
           
        }
View Full Code Here

            if (bus == null) {
                bus = BusFactory.newInstance().createBus();
                BusFactory.setThreadDefaultBus(bus);
            }
            try {
                new WADLToJava(args).run(new ToolContext());
            } catch (Throwable e) {
                getLog().debug(e);
                throw new MojoExecutionException(e.getMessage(), e);
           
        }
View Full Code Here

public class JAXWSDefinitionBuilderTest extends Assert {
    private ToolContext env;

    @Before
    public void setUp() {
        env = new ToolContext();
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.ToolContext

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.