Package org.jboss.ws.tools

Examples of org.jboss.ws.tools.WSTools


   // [JBWS-719] Enable schema validation on wstools config
   public void testInvalidConfig() throws IOException, ClassNotFoundException
   {
      String[] args = new String[] { "-dest", "tools/globalconfig", "-config", "resources/tools/config/invalidConfig.xml" };
      WSTools tools = new WSTools();
      try
      {
         tools.generate(args);
         fail("Expected to fail on invalid config");
      }
      catch (Exception ex)
      {
         String msg = ex.getMessage();
View Full Code Here


{

   public void testJavaToWSDL() throws IOException
   {
      String[] args = new String[] { "-dest", "tools/globalconfig", "-config", "resources/tools/config/java2wsdlglobal.xml" };
      WSTools tools = new WSTools();
      tools.generate(args);

      WSDLDefinitions wsdl = getWSDLDefinitions(new File("tools/globalconfig/wsdl/MarshallService.wsdl"));
      JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
      assertNotNull(xsmodel.getNamespaceItem("http://jboss.org/types"));
   }
View Full Code Here

   }

   public void testWSDLToJava() throws IOException, ClassNotFoundException
   {
      String[] args = new String[] { "-dest", "tools/globalconfig", "-config", "resources/tools/config/wsdl2javaglobal.xml" };
      WSTools tools = new WSTools();
      tools.generate(args);
      File file = new File("tools/globalconfig/org/jboss/test/ws/StandardJavaTypes.java");
      assertTrue(file.exists());
      checkGeneratedClass(file);
   }
View Full Code Here

   {
      String resourceDir = "resources/tools/jbws1536";
      String toolsDir = "tools/jbws1536";
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };

      new WSTools().generate(args);
     
      Element expected = DOMUtils.parse(new FileInputStream("resources/tools/jbws1536/webservices.xml"));
      Element was = DOMUtils.parse(new FileInputStream("tools/jbws1536/webservices.xml"));
      assertEquals(expected, was);     
   }
View Full Code Here

      src.close();
      dest.close();

      // run wstools
      String[] args = { "-dest", "tools/jbws1090", "-config", "resources/tools/jbws1090/wstools-config.xml" };
      new WSTools().generate(args);

      Element expected = DOMUtils.parse(new FileInputStream("resources/tools/jbws1090/webservices.xml"));
      Element was = DOMUtils.parse(new FileInputStream("tools/jbws1090/webservices.xml"));
      assertEquals(expected, was);
   }
View Full Code Here

   protected void generateScenario(final String scenario) throws Exception
   {
      String resourceDir = "resources/tools/jbws1698/" + scenario;
      String toolsDir = "tools/jbws1698/" + scenario;
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
      new WSTools().generate(args);
      File resourceDirFile = new File(resourceDir);
      String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
         public boolean accept(File dir, String name)
         {
            return name.endsWith(".java");
View Full Code Here

   protected void generateScenario(final String scenario) throws Exception
   {
      String resourceDir = "resources/tools/jbws1184/scenario_" + scenario;
      String toolsDir = "tools/jbws1184/scenario_" + scenario;
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
      new WSTools().generate(args);

      compareSource(resourceDir + "/DataObject.java", toolsDir + "/org/jboss/test/ws/jbws1184/DataObject.java");
      compareSource(resourceDir + "/TestEndpoint_PortType.java", toolsDir + "/org/jboss/test/ws/jbws1184/TestEndpoint_PortType.java");

      JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
View Full Code Here

   public final void testHyphenatedElement() throws Exception
   {
      String resourceDir = "resources/tools/jbws1170";
      String toolsDir = "tools/jbws1170";
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
      new WSTools().generate(args);

      // With JDK6 these are not lexically equivalent
      //Element exp = DOMUtils.parse(new FileInputStream(resourceDir + "/wrapper-mapping.xml"));
      //Element was = DOMUtils.parse(new FileInputStream(toolsDir + "/wrapper-mapping.xml"));
      //assertEquals(exp, was);
View Full Code Here

   protected void generateScenario(final String scenario) throws Exception
   {
      String resourceDir = "resources/tools/jbws1278/" + scenario;
      String toolsDir = "tools/jbws1278/" + scenario;
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
      new WSTools().generate(args);
      File resourceDirFile = new File(resourceDir);
      String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
         public boolean accept(File dir, String name)
         {
            return name.endsWith(".java");
View Full Code Here

   public void testGenerate() throws Exception
   {
      String resourceDir = "resources/tools/jbws1453";
      String toolsDir = "tools/jbws1453";
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
      new WSTools().generate(args);

      File resourceDirFile = new File(resourceDir);
      String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
         public boolean accept(File dir, String name)
         {
View Full Code Here

TOP

Related Classes of org.jboss.ws.tools.WSTools

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.