Package org.jboss.ws.tools

Examples of org.jboss.ws.tools.WSTools


public class EnumTestCase extends JBossWSTest
{
   public final void testEnumWsdl() throws Exception
   {
      String config = getResourceFile("tools/enums/wstools-config.xml").getAbsolutePath();
      new WSTools().generate(new String[] {"-dest", "tools/enums", "-config", config});
     
      Element exp = DOMUtils.parse(new FileInputStream(getResourceFile("tools/enums/EnumService.wsdl").getAbsolutePath()));
      Element was = DOMUtils.parse(new FileInputStream("tools/enums/wsdl/EnumService.wsdl"));
      assertEquals(exp, was);
   }
View Full Code Here


   {
      String out_dir = getResourceFile("tools/jbws-206/jbossws/" + getBase()).getAbsolutePath();
      String configloc = getResourceFile("tools/jbws-206/jbosswsConfig/" + getBase() + "/" + getBase() + "wsdl2java.xml").getAbsolutePath();

      String[] args = new String[] { "-dest", out_dir, "-config", configloc };
      WSTools tools = new WSTools();
      tools.generate(args);
      checkServiceEndpointInterface();
      checkServiceInterface();
      checkGeneratedUserTypes();
   }
View Full Code Here

      File resourceDir = createResourceFile("tools/jbws1723/" + scenario);
      resourceDir.mkdirs();

      String toolsDir = "target/wstools/jbws1723/" + scenario;
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir.getAbsolutePath() + "/wstools-config.xml" };
      new WSTools().generate(args);

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

      File resourceDir = createResourceFile("tools/jbws1725");
      resourceDir.mkdirs();

      String toolsDir = resourceDir.getAbsolutePath();
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir.getAbsolutePath() + "/wstools-config.xml" };
      new WSTools().generate(args);

      compareSource(resourceDir + "/PasswordType.java", toolsDir + "/org/jboss/test/ws/jbws1725/PasswordType.java");
   }
View Full Code Here

   public final void testPortTypePort() throws Exception
   {
      File resourceDir = createResourceFile("tools/jbws1253");
      String toolsDir = "target/wstools/jbws1253/output";
      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir.getAbsolutePath() + "/wstools-config.xml" };
      new WSTools().generate(args);

      JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
      mappingValidator.validate(resourceDir.getAbsolutePath() + "/myporttype-mapping.xml", toolsDir + "/myporttype-mapping.xml");

      File expSEI = getResourceFile(resourceDir + "/My.java");
View Full Code Here

   {
      File resourceDir = createResourceFile("tools/jbws1607");
      String toolsDir = "target/wstools/jbws1607/output";

      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir.getAbsolutePath() + "/wstools-config.xml" };
      new WSTools().generate(args);


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

   // [JBWS-719] Enable schema validation on wstools config
   public void testInvalidConfig() throws IOException, ClassNotFoundException
   {
      String[] args = new String[] { "-dest", "tools/globalconfig", "-config", getResourceFile("tools/config/invalidConfig.xml").getAbsolutePath() };
      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 final void testHyphenatedElement() throws Exception
   {
      String resourceDir = createResourceFile("tools/jbws1170").getAbsolutePath();
      String toolsDir = resourceDir; //"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

   {
      File dir = createResourceFile("tools/globalconfig");
      dir.mkdirs();

      String[] args = new String[] { "-dest", dir.getAbsolutePath(), "-config", getResourceFile("tools/config/java2wsdlglobal.xml").getAbsolutePath() };
      WSTools tools = new WSTools();
      tools.generate(args);

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

   {
      File dir = createResourceFile("tools/globalconfig");
      dir.mkdirs();

      String[] args = new String[] { "-dest", dir.getAbsolutePath(), "-config", getResourceFile("tools/config/wsdl2javaglobal.xml").getPath() };
      WSTools tools = new WSTools();
      tools.generate(args);
      File file = getResourceFile("tools/globalconfig/org/jboss/test/ws/StandardJavaTypes.java");
      assertTrue(file.exists());
      checkGeneratedClass(file);
   }
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.