Package java.io

Examples of java.io.File.toURL()


            System.exit(1);
        }

        File wsdl = new File(args[0]);

        JMSGreeterService service = new JMSGreeterService(wsdl.toURL(), SERVICE_NAME);
        JMSGreeterPortType greeter = (JMSGreeterPortType)service.getPort(PORT_NAME, JMSGreeterPortType.class);

        System.out.println("Invoking sayHi...");
        System.out.println("server responded with: " + greeter.sayHi());
        System.out.println();
View Full Code Here


        }
   
        URL wsdlURL;
        File wsdlFile = new File(args[0]);
        if (wsdlFile.exists()) {
            wsdlURL = wsdlFile.toURL();
        } else {
            wsdlURL = new URL(args[0]);
        }
       
        MessageFactory factory = MessageFactory.newInstance();
View Full Code Here

                for (int ctr = 0; ctr < files.length; ctr++)
                {
                    File file = new File(currentDirectory, files[ctr]);
                    if (StringUtils.trimToEmpty(file.getName()).startsWith(TEST_PREFIX))
                    {
                        final URL testUrl = file.toURL();
                        if (logger.isInfoEnabled())
                        {
                            logger.info("found translation test --> '" + testUrl + "'");
                        }
View Full Code Here

         if (!file.canRead()) {
            log.warning("findFileInSinglePath: don't have the rights to read the file '" + file.getAbsolutePath() + "'");
            return null;
         }
         try {
            return file.toURL();
         }
         catch (java.net.MalformedURLException ex) {
            log.warning("findFileInSinglePath: path='" + path + "', filename='" + filename + " exception: " + ex.getMessage());
            return null;
         }
View Full Code Here

    {
        try {
            String  userDir = getSystemProperty( "user.dir" );
            String  fileName = userDir + File.separator + SupportFilesSetup.EXTINOUT + File.separator + TARGET_POLICY_FILE_NAME;
            File      file = new File( fileName );
            String  urlString = file.toURL().toExternalForm();

            return urlString;
        }
        catch (Exception e)
        {
View Full Code Here

                    "WebAppConfig.BadResourcePath", path));
        } else if (!path.equals("/") && path.endsWith("/")) {
            path = path.substring(0, path.length() - 1);
        }
        File res = new File(webRoot, path.substring(1));
        return (res != null) && res.exists() ? res.toURL() : null;
    }

    public InputStream getResourceAsStream(String path) {
        try {
            URL res = getResource(path);
View Full Code Here

        } else {
            System.out.println("not using pipe");
        }
        File wsdl = new File(wsdlPath);
        try {
            cs = new ComplexService(wsdl.toURL(), SERVICE_NAME);
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        port = (ComplexPortType)cs.getPort(PORT_NAME, ComplexPortType.class);
        if (usePipe) {
View Full Code Here

            System.exit(1);
        }

        File wsdl = new File(args[0]);

        HelloWorldService ss = new HelloWorldService(wsdl.toURL(), SERVICE_NAME);
        HelloWorldServiceSoap port = ss.getHelloWorldServiceSoap();

        String resp;

        System.out.println("Invoking sayHi...");
View Full Code Here

        }

        URL wsdlURL;
        File wsdlFile = new File(args[0]);
        if (wsdlFile.exists()) {
            wsdlURL = wsdlFile.toURL();
        } else {
            wsdlURL = new URL(args[0]);
        }
       
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
View Full Code Here

            System.exit(1);
        }

        File wsdl = new File(args[0]);
       
        SOAPService ss = new SOAPService(wsdl.toURL(), SERVICE_NAME);
        GreeterAsync port = ss.getSoapPort();
        String resp;
       
        // callback method
        TestAsyncHandler testAsyncHandler = new TestAsyncHandler();
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.