Package org.jboss.wsf.spi.tools

Examples of org.jboss.wsf.spi.tools.WSContractProvider


      }

      // debug output
      if(loadProvider)
      {
         WSContractProvider gen = WSContractProvider.newInstance(loader);
         System.out.println("WSContractProvider instance: " + gen.getClass().getCanonicalName());
         System.exit(0);
      }

      int endpointPos = getopt.getOptind();
      if (endpointPos >= args.length)
View Full Code Here


      {
         System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
         return 1;
      }
     
      WSContractProvider gen = WSContractProvider.newInstance(loader);
      gen.setGenerateWsdl(generateWsdl);
      gen.setGenerateSource(generateSource);
      gen.setOutputDirectory(outputDir);
      if (resourceDir != null)
         gen.setResourceDirectory(resourceDir);
      if (sourceDir != null)
         gen.setSourceDirectory(sourceDir);

      if (! quiet)
         gen.setMessageStream(System.out);
     
      try
      {
         gen.provide(endpoint);
         return 0;
      }
      catch (Throwable t)
      {
         System.err.println("Error: Could not generate. (use --show-traces to see full traces)");
View Full Code Here

      ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
      ClassLoader antLoader = this.getClass().getClassLoader();
      Thread.currentThread().setContextClassLoader(antLoader);
      try
      {
         WSContractProvider gen = WSContractProvider.newInstance(
          getClasspathLoader(antLoader)
      );        
         if (verbose)
            gen.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
         gen.setGenerateSource(keep);
         gen.setGenerateWsdl(genwsdl);
         if (destdir != null)
            gen.setOutputDirectory(destdir);
         if (resourcedestdir != null)
            gen.setResourceDirectory(resourcedestdir);
         if (sourcedestdir != null)
            gen.setSourceDirectory(sourcedestdir);

         log("Generating from endpoint: " + sei, Project.MSG_INFO);
        
         gen.provide(sei);
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(prevCL);
      }
View Full Code Here

      }

      // debug output
      if(loadProvider)
      {
         WSContractProvider gen = WSContractProvider.newInstance(loader);
         System.out.println("WSContractProvider instance: " + gen.getClass().getCanonicalName());
         System.exit(0);
      }

      int endpointPos = getopt.getOptind();
      if (endpointPos >= args.length)
View Full Code Here

      {
         System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
         return 1;
      }
     
      WSContractProvider gen = WSContractProvider.newInstance(loader);
      gen.setGenerateWsdl(generateWsdl);
      gen.setGenerateSource(generateSource);
      gen.setOutputDirectory(outputDir);
      if (resourceDir != null)
         gen.setResourceDirectory(resourceDir);
      if (sourceDir != null)
         gen.setSourceDirectory(sourceDir);

      if (! quiet)
         gen.setMessageStream(System.out);
     
      try
      {
         gen.provide(endpoint);
         return 0;
      }
      catch (Throwable t)
      {
         System.err.println("Error: Could not generate. (use --show-traces to see full traces)");
View Full Code Here

*/
public class WSContractProviderTestCase extends JBossWSTest
{
   public void testBasic() throws Exception
   {
      WSContractProvider gen = getGenerator();
      File outputDir = new File("tools/jaxws/wscontractprovider/basic/out");
      gen.setOutputDirectory(outputDir);
      gen.provide(DocWrappedServiceImpl.class);
     
      checkWrapperClasses(outputDir);
  
      // There should be no source code
      checkWrapperSource(outputDir, false);
View Full Code Here

      assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
   }
  
   public void testSource() throws Exception
   {
      WSContractProvider gen = getGenerator();
      File outputDir = new File("tools/jaxws/wscontractprovider/source/out");
      gen.setOutputDirectory(outputDir);
      gen.setGenerateSource(true);
      gen.provide(DocWrappedServiceImpl.class);
     
      checkWrapperClasses(outputDir);
      checkWrapperSource(outputDir, true);
   }
View Full Code Here

      checkWrapperSource(outputDir, true);
   }
  
   public void testSourceDir() throws Exception
   {
      WSContractProvider gen = getGenerator();
      File outputDir = new File("tools/jaxws/wscontractprovider/sourcedir/out");
      File sourceDir = new File("tools/jaxws/wscontractprovider/sourcedir/source");
     
      gen.setOutputDirectory(outputDir);
      gen.setSourceDirectory(sourceDir);
      gen.setGenerateSource(true);
      gen.provide(DocWrappedServiceImpl.class);
     
      checkWrapperClasses(outputDir);
      checkWrapperSource(outputDir, false);
      checkWrapperSource(sourceDir, true);
   }
View Full Code Here

      checkWrapperSource(sourceDir, true);
   }
  
   public void testWsdl() throws Exception
   {
      WSContractProvider gen = getGenerator();
      File outputDir = new File("tools/jaxws/wscontractprovider/wsdl/out");
      gen.setOutputDirectory(outputDir);
      gen.setGenerateWsdl(true);
      gen.provide(DocWrappedServiceImpl.class);
     
      checkWrapperClasses(outputDir);
  
      // There should be no source code
      checkWrapperSource(outputDir, false);
View Full Code Here

      wsdlFactory.parse(wsdlFile.toURL());
   }
  
   public void testResourceDir() throws Exception
   {
      WSContractProvider gen = getGenerator();
      File outputDir = new File("tools/jaxws/wscontractprovider/resourcedir/out");
      File wsdlDir = new File("tools/jaxws/wscontractprovider/resourcedir/wsdl");
      gen.setOutputDirectory(outputDir);
      gen.setResourceDirectory(wsdlDir);
      gen.setGenerateWsdl(true);
      gen.provide(DocWrappedServiceImpl.class);
     
      checkWrapperClasses(outputDir);
  
      // There should be no source code
      checkWrapperSource(outputDir, false);
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.tools.WSContractProvider

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.