Examples of SchemaGenerator


Examples of org.apache.axis2.description.java2wsdl.SchemaGenerator

        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNamespaceMap(map);
        SchemaGenerator schemaGenerator;
        Parameter generateBare = axisService
                .getParameter(Java2WSDLConstants.DOC_LIT_BARE_PARAMETER);
        if (generateBare != null && "true".equals(generateBare.getValue())) {
            schemaGenerator = new DocLitBareSchemaGenerator(serviceClassLoader,
                                                            serviceClass.getName(),
                                                            axisService.getSchemaTargetNamespace(),
                                                            axisService
                                                                    .getSchemaTargetNamespacePrefix(),
                                                            axisService);
        } else {
            schemaGenerator = new DefaultSchemaGenerator(serviceClassLoader,
                                                         serviceClass.getName(),
                                                         axisService.getSchemaTargetNamespace(),
                                                         axisService
                                                                 .getSchemaTargetNamespacePrefix(),
                                                         axisService);
        }
        schemaGenerator.setExcludeMethods(excludeOperations);
        schemaGenerator.setNonRpcMethods(nonRpcMethods);
        if (!axisService.isElementFormDefault()) {
            schemaGenerator
                    .setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
        }
        // package to namespace map
        schemaGenerator.setPkg2nsmap(axisService.getP2nMap());
        Collection schemas = schemaGenerator.generateSchema();
        axisService.addSchema(schemas);
        axisService.setSchemaTargetNamespace(schemaGenerator
                .getSchemaTargetNameSpace());
        axisService.setTypeTable(schemaGenerator.getTypeTable());
        if (Java2WSDLConstants.DEFAULT_TARGET_NAMESPACE.equals(axisService
                .getTargetNamespace())) {
            axisService
                    .setTargetNamespace(schemaGenerator.getTargetNamespace());
        }

        Method[] method = schemaGenerator.getMethods();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (Method jmethod : method) {
            String opName = jmethod.getName();
            AxisOperation operation = axisService
View Full Code Here

Examples of org.apache.axis2.description.java2wsdl.SchemaGenerator

    map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
        Java2WSDLConstants.AXIS2_XSD);
    map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
        Java2WSDLConstants.URI_2001_SCHEMA_XSD);
    axisService.setNamespaceMap(map);
    SchemaGenerator schemaGenerator;
    Parameter generateBare = axisService
        .getParameter(Java2WSDLConstants.DOC_LIT_BARE_PARAMETER);
    if (generateBare != null && "true".equals(generateBare.getValue())) {
      schemaGenerator = new DocLitBareSchemaGenerator(serviceClassLoader,
          serviceClass.trim(),
          axisService.getSchemaTargetNamespace(), axisService
              .getSchemaTargetNamespacePrefix(), axisService);
    } else {
      schemaGenerator = new DefaultSchemaGenerator(serviceClassLoader,
          serviceClass.trim(),
          axisService.getSchemaTargetNamespace(), axisService
              .getSchemaTargetNamespacePrefix(), axisService);
    }
    schemaGenerator.setExcludeMethods(excludeOperations);
    schemaGenerator.setNonRpcMethods(nonRpcMethods);
    if (!axisService.isElementFormDefault()) {
      schemaGenerator
          .setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
    }
    // package to namespace map
    schemaGenerator.setPkg2nsmap(axisService.getP2nMap());
    Collection schemas = schemaGenerator.generateSchema();
    axisService.addSchema(schemas);
    axisService.setSchemaTargetNamespace(schemaGenerator
        .getSchemaTargetNameSpace());
    axisService.setTypeTable(schemaGenerator.getTypeTable());
    if (Java2WSDLConstants.DEFAULT_TARGET_NAMESPACE.equals(axisService
        .getTargetNamespace())) {
      axisService
          .setTargetNamespace(schemaGenerator.getTargetNamespace());
    }

    JMethod[] method = schemaGenerator.getMethods();
    PhasesInfo pinfo = axisConfig.getPhasesInfo();

    for (int i = 0; i < method.length; i++) {
      JMethod jmethod = method[i];
      String opName = getSimpleName(jmethod);
View Full Code Here

Examples of org.apache.axis2.description.java2wsdl.SchemaGenerator

      serviceName = implClass.substring(index + 1, implClass.length());
    } else {
      serviceName = implClass;
    }

    SchemaGenerator schemaGenerator;
    ArrayList excludeOpeartion = new ArrayList();
    AxisService service = new AxisService();
    service.setParent(axisConfiguration);
    service.setName(serviceName);

    try {
      Parameter generateBare = service
          .getParameter(Java2WSDLConstants.DOC_LIT_BARE_PARAMETER);
      if (generateBare != null && "true".equals(generateBare.getValue())) {
        schemaGenerator = new DocLitBareSchemaGenerator(loader,
            implClass, schemaNamespace,
            Java2WSDLConstants.SCHEMA_NAMESPACE_PRFIX, service);
      } else {
        schemaGenerator = new DefaultSchemaGenerator(loader, implClass,
            schemaNamespace,
            Java2WSDLConstants.SCHEMA_NAMESPACE_PRFIX, service);
      }
      schemaGenerator
          .setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
      Utils.addExcludeMethods(excludeOpeartion);
      schemaGenerator.setExcludeMethods(excludeOpeartion);
    } catch (Exception e) {
      throw AxisFault.makeFault(e);
    }

    return createService(implClass, serviceName, axisConfiguration,
View Full Code Here

Examples of org.apache.axis2.wsdl.builder.SchemaGenerator

        axisService.setName(serviceName);
        axisService.setClassLoader(axisConfig.getServiceClassLoader());

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, axisService.getSchematargetNamespace(),
                    axisService.getSchematargetNamespacePrefix());
            axisService.setSchema(schemaGenerator.generateSchema());
        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.axis2.wsdl.builder.SchemaGenerator

            // Nothing to do.
            return;
        }
        String serviceClass = (String) implInfoParam.getValue();
        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
                serviceClass.trim(), axisService.getSchematargetNamespace(),
                axisService.getSchematargetNamespacePrefix());
        axisService.setSchema(schemaGenerator.generateSchema());

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
View Full Code Here

Examples of org.apache.axis2.wsdl.java2wsdl.SchemaGenerator

    public static void fillAxisService(AxisService axisService,
                                       AxisConfiguration axisConfig) throws Exception {
        Parameter implInfoParam = axisService.getParameter(Constants.SERVICE_CLASS);
        String serviceClass = (String) implInfoParam.getValue();
        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
                serviceClass, null, null);
        axisService.setSchema(schemaGenerator.generateSchema());

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
View Full Code Here

Examples of org.apache.axis2.wsdl.java2wsdl.SchemaGenerator

        axisService.setName(serviceName);
        axisService.setClassLoader(axisConfig.getServiceClassLoader());

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
                implClass, null, null);
        try {
            axisService.setSchema(schemaGenerator.generateSchema());
        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaGenerator

     * Return the schema group to reverse map. If none has been set, the
     * schema will be generated from the database.
     */
    public SchemaGroup getSchemaGroup() {
        if (_schema == null) {
            SchemaGenerator gen = new SchemaGenerator(_conf);
            try {
                gen.generateSchemas();
            } catch (SQLException se) {
                throw SQLExceptions.getStore(se,
                    _conf.getDBDictionaryInstance());
            }
            _schema = gen.getSchemaGroup();
        }
        return _schema;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaGenerator

        // parse the schema to reverse-map
        Log log = conf.getLog(OpenJPAConfiguration.LOG_TOOL);
        SchemaGroup schema;
        if (args.length == 0) {
            log.info(_loc.get("revtool-running"));
            SchemaGenerator gen = new SchemaGenerator(conf);
            gen.generateSchemas();
            schema = gen.getSchemaGroup();
        } else {
            SchemaParser parser = new XMLSchemaParser(conf);
            File file;
            for (int i = 0; i < args.length; i++) {
                file = Files.getFile(args[i], loader);
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaGenerator

     * Return the schema group to reverse map. If none has been set, the
     * schema will be generated from the database.
     */
    public SchemaGroup getSchemaGroup() {
        if (_schema == null) {
            SchemaGenerator gen = new SchemaGenerator(_conf);
            try {
                gen.generateSchemas();
            } catch (SQLException se) {
                throw SQLExceptions.getStore(se,
                    _conf.getDBDictionaryInstance());
            }
            _schema = gen.getSchemaGroup();
        }
        return _schema;
    }
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.