Examples of ToolContext


Examples of com.opengamma.financial.tool.ToolContext

  }

  //-------------------------------------------------------------------------
  @Override
  protected void doRun() {
    ToolContext toolContext = getToolContext();
    ConfigMaster configMaster = toolContext.getConfigMaster();

    CommandLine commandLine = getCommandLine();
    final String name = commandLine.getOptionValue("name", WILDCARD_SEARCH);
    final boolean dryRun = commandLine.hasOption("do-not-persist");
    final boolean skipExisting = commandLine.hasOption("skip");
View Full Code Here

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

            List<String> list = generateCommandLine(wsdlOption, outputDirFile, basedir, wsdlURI);

            getLog().debug("Calling wsdl2java with args: " + list);
            try {
                new WSDLToJava((String[])list.toArray(new String[list.size()])).run(new ToolContext());
            } catch (Throwable e) {
                getLog().debug(e);
                throw new MojoExecutionException(e.getMessage(), e);
            }
            try {
View Full Code Here

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

public class JAXWSDefinitionBuilderTest extends Assert {
    private ToolContext env;

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

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

    protected File classDir;

    @Before
    public void setUpResource() throws Exception {
        super.setUp();
        env = new ToolContext();
        cp = System.getProperty("java.class.path");
        URL url = getClass().getResource(".");
        output = new File(url.toURI());
        System.setProperty("java.class.path", getClassPath());
        output = new File(output, "/generated/");
View Full Code Here

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

    JavaToWSDLProcessor processor = new JavaToWSDLProcessor();
    String classPath = "";
    private WSDLHelper wsdlHelper = new WSDLHelper();
    @Before
    public void startUp() throws Exception {
        env = new ToolContext();
        env.put(ToolConstants.CFG_WSDL, ToolConstants.CFG_WSDL);

        classPath = System.getProperty("java.class.path");
        System.setProperty("java.class.path", getClassPath());
    }
View Full Code Here

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

        System.setProperty("java.class.path", classPath);
    }

    @Test
    public void testGetWSDLVersion() {
        processor.setEnvironment(new ToolContext());
        assertEquals(WSDLConstants.WSDLVersion.WSDL11, processor.getWSDLVersion());
    }
View Full Code Here

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

        boolean isWsdlList = context.optionSet(ToolConstants.CFG_WSDLLIST);

        if (isWsdlList) {
            BufferedReader reader = null;
            try {
                ToolContext initialContextState = context.makeCopy();
                String wsdlURL = (String)context.get(ToolConstants.CFG_WSDLURL);
                wsdlURL = URIParserUtil.getAbsoluteURI(wsdlURL);

                URL url = new URL(wsdlURL);
                InputStream is = (InputStream)url.getContent();
                reader = new BufferedReader(new InputStreamReader(is));
                String tempLine = null;
                while ((tempLine = reader.readLine()) != null) {                   
                    ToolContext freshContext = initialContextState.makeCopy();
                    freshContext.put(ToolConstants.CFG_WSDLURL, tempLine);
                    setContext(freshContext);
                    buildToolContext();
                   
                    processWsdl();
                }
View Full Code Here

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

    public void setUp() throws Exception {
        JAXBContextCache.clearCaches();
        builder = new JaxwsServiceBuilder();
        builder.setBus(BusFactory.getDefaultBus());
        generator.setBus(builder.getBus());
        generator.setToolContext(new ToolContext());
       
        Bus b = builder.getBus();
        assertNotNull(b.getExtension(DestinationFactoryManager.class)
            .getDestinationFactory("http://schemas.xmlsoap.org/soap/http"));
    }
View Full Code Here

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

        List<String> list = wsdlOption.generateCommandLine(outputDirFile, basedir, wsdlURI, getLog()
            .isDebugEnabled());
        String[] args = (String[])list.toArray(new String[list.size()]);
        getLog().debug("Calling wsdl2java with args: " + Arrays.toString(args));
        try {
            new WSDLToJava(args).run(new ToolContext());
        } catch (Throwable e) {
            getLog().debug(e);
            throw new MojoExecutionException(e.getMessage(), e);
        }
        try {
View Full Code Here

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

        boolean isWsdlList = context.optionSet(ToolConstants.CFG_WSDLLIST);

        if (isWsdlList) {
            BufferedReader reader = null;
            try {
                ToolContext initialContextState = context.makeCopy();
                String wsdlURL = (String)context.get(ToolConstants.CFG_WSDLURL);
                wsdlURL = URIParserUtil.getAbsoluteURI(wsdlURL);

                URL url = new URL(wsdlURL);
                InputStream is = (InputStream)url.getContent();
                reader = new BufferedReader(new InputStreamReader(is));
                String tempLine = null;
                while ((tempLine = reader.readLine()) != null) {                   
                    ToolContext freshContext = initialContextState.makeCopy();
                    freshContext.put(ToolConstants.CFG_WSDLURL, tempLine);
                    setContext(freshContext);
                    buildToolContext();
                   
                    processWsdl();
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.