Package org.codehaus.enunciate.config

Examples of org.codehaus.enunciate.config.EnunciateConfiguration


    wsdlConfig = new WsdlConfig();
    wsdlConfig.setNamespace(RELATIONSHIP_NAMESPACE);
    wsdlConfig.setFile("relationship.wsdl");
    xmlModule.addWsdlConfig(wsdlConfig);

    EnunciateConfiguration config = new EnunciateConfiguration(Arrays.asList((DeploymentModule) xmlModule));
    config.setValidator(new BaseValidator());
    config.setDeploymentHost("www.thebestgenealogywebsite.com");
    config.setDeploymentContext("/genealogy");
    config.setDeploymentProtocol("https");
    config.putNamespace(CITE_NAMESPACE, "cite");
    config.putNamespace(DATA_NAMESPACE, "data");
    config.putNamespace(FULL_NAMESPACE, "full");
    config.putNamespace(null, "default");
    Enunciate enunciate = new Enunciate(getAllJavaFiles("full"));
    enunciate.setConfig(config);
    enunciate.setTarget(Enunciate.Target.GENERATE);
    enunciate.setRuntimeClasspath(getInAPTClasspath());
    enunciate.execute();
View Full Code Here


          }
        }
      }

      if (enableJaxws) {
        EnunciateConfiguration config = model.getEnunciateConfig();
        for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) {
          for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
            String path = "/soap/" + ei.getServiceName();
            if (config != null) {
              path = config.getDefaultSoapSubcontext() + '/' + ei.getServiceName();
              if (config.getSoapServices2Paths().containsKey(ei.getServiceName())) {
                path = config.getSoapServices2Paths().get(ei.getServiceName());
              }
            }

            ei.putMetaData("soapPath", path);
          }
View Full Code Here

   * Tests the process.
   */
  @OutsideAPTOkay
  public void testProcess() throws Exception {
    final MockDeploymentModule mockModule = new MockDeploymentModule();
    EnunciateConfiguration config = new EnunciateConfiguration() {
      @Override
      public List<DeploymentModule> getEnabledModules() {
        return Arrays.asList(new DeploymentModule[]{mockModule});
      }
    };
View Full Code Here

  /**
   * Tests getting the root model.
   */
  public void testGetRootModel() throws Exception {
    EnunciateConfiguration config = new EnunciateConfiguration();
    config.putNamespace("urn:test", "test");
    config.putNamespace("http://enunciate.codehaus.org/samples/contract", "tContract");
    config.setExcludeUnreferencedClasses(false);

    final boolean[] validated = new boolean[]{false};
    Enunciate enunciate = new Enunciate(new String[0]);
    enunciate.setConfig(config);
    EnunciateAnnotationProcessor processor = new EnunciateAnnotationProcessor(enunciate) {
View Full Code Here

  /**
   * Tests getting the root model.
   */
  public void testGetRootModelExcludingUnreferenced() throws Exception {
    EnunciateConfiguration config = new EnunciateConfiguration();
    config.putNamespace("urn:test", "test");
    config.putNamespace("http://enunciate.codehaus.org/samples/contract", "tContract");

    final boolean[] validated = new boolean[]{false};
    Enunciate enunciate = new Enunciate(new String[0]);
    enunciate.setConfig(config);
    EnunciateAnnotationProcessor processor = new EnunciateAnnotationProcessor(enunciate) {
View Full Code Here

    final ComplexTypeDefinition beanTwo = new ComplexTypeDefinition((ClassDeclaration) getDeclaration("org.codehaus.enunciate.samples.schema.BeanTwo"));
    final ComplexTypeDefinition beanThree = new ComplexTypeDefinition((ClassDeclaration) getDeclaration("org.codehaus.enunciate.samples.schema.BeanThree"));
    final Messager messager = EasyMock.createNiceMock(Messager.class);
    RootElementDeclaration beanThreeElement = new RootElementDeclaration((ClassDeclaration) getDeclaration("org.codehaus.enunciate.samples.schema.BeanThree"), beanThree);

    EnunciateConfiguration config = new EnunciateConfiguration();
    final MockValidator validator = new MockValidator();
    config.setValidator(validator);
    config.addModule(new BasicDeploymentModule() {
      @Override
      public Validator getValidator() {
        return validator;
      }
    });

    config.addModule(new BasicDeploymentModule() {
      public String getName() {
        return "basic2";
      }

      @Override
View Full Code Here

    createClassFile("org.codehaus.enunciate.pckg3.SampleClassTen", dirToZipUp);
    createSourceFile("org.codehaus.enunciate.pckg3.SampleClassTen", dirToZipUp);
    File jarFile2 = File.createTempFile("enunciatetest", ".jar");
    enunciate.zip(jarFile2, dirToZipUp);
    enunciate.setRuntimeClasspath(dirEntry.getAbsolutePath() + File.pathSeparator + jarFile.getAbsolutePath() + File.pathSeparator + jarFile2.getAbsolutePath());
    EnunciateConfiguration config = new EnunciateConfiguration(Collections.<DeploymentModule>emptyList());
    APIImport apiImport = new APIImport();
    apiImport.setPattern("org.codehaus.enunciate.pckg1.SampleClassOne");
    config.addAPIImport(apiImport);
    apiImport = new APIImport();
    apiImport.setPattern("org.codehaus.enunciate.pckg1.with.**");
    config.addAPIImport(apiImport);
    apiImport = new APIImport();
    apiImport.setPattern("org.codehaus.enunciate.pckg2.*");
    config.addAPIImport(apiImport);
    apiImport = new APIImport();
    apiImport.setPattern("some.other.class.that.is.Explicit");
    config.addAPIImport(apiImport);
    enunciate.setConfig(config);

    ImportedClassesClasspathHandler handler = new ImportedClassesClasspathHandler(enunciate);
    enunciate.scanClasspath(Arrays.asList((ClasspathHandler) handler));
    Map<String,File> classes2Import = handler.getClassesToSources();
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.config.EnunciateConfiguration

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.