Package org.apache.ws.java2wsdl

Examples of org.apache.ws.java2wsdl.SchemaGenerator


     *
     * @throws Exception
     */
    public void buildWSDL() throws Exception
    {
        SchemaGenerator sg = new SchemaGenerator(classLoader, className,
                schemaTargetNamespace, schemaTargetNamespacePrefix);
        Collection schemaCollection = sg.generateSchema();
        TuscanyJava2OMBuilder java2OMBuilder = new TuscanyJava2OMBuilder(sg.getMethods(),
            schemaCollection,
            sg.getTypeTable(),
                serviceName == null ? Java2WSDLUtils.getSimpleClassName(className) : serviceName,
                targetNamespace == null ? Java2WSDLUtils.namespaceFromClassName(className, classLoader).toString():targetNamespace,
                targetNamespacePrefix,
                style,
                use,
View Full Code Here


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

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        ArrayList excludeOpeartion = new ArrayList();


        NamespaceMap map = new NamespaceMap();
        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);


        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, schemaNamespace,
                    axisService.getSchematargetNamespacePrefix());
            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
            axisService.setElementFormDefault(false);
            excludeOpeartion.add("init");
            excludeOpeartion.add("setOperationContext");
            excludeOpeartion.add("destroy");
            excludeOpeartion.add("startUp");
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(schemaGenerator.generateSchema());
            axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
            axisService.setTypeTable(schemaGenerator.getTypeTable());
            if (targetNamespace == null) {
                targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
            }
            if (targetNamespace != null && !"".equals(targetNamespace)) {
                axisService.setTargetNamespace(targetNamespace);
            }
        } catch (Exception e) {
            throw new AxisFault(e);
        }

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

        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();

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

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

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        ArrayList excludeOpeartion = new ArrayList();


        NamespaceMap map = new NamespaceMap();
        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);


        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, schemaNameSpace,
                    axisService.getSchematargetNamespacePrefix());
            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
            axisService.setElementFormDefault(false);
            excludeOpeartion.add("init");
            excludeOpeartion.add("setOperationContext");
            excludeOpeartion.add("destroy");
            excludeOpeartion.add("startUp");
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(schemaGenerator.generateSchema());
            axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
            axisService.setTypeTable(schemaGenerator.getTypeTable());
            if (targetNameSpace == null) {
                targetNameSpace = schemaGenerator.getSchemaTargetNameSpace();
            }
            if (targetNameSpace != null && !"".equals(targetNameSpace)) {
                axisService.setTargetNamespace(targetNameSpace);
            }
        } 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

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

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        ArrayList excludeOpeartion = new ArrayList();


        NamespaceMap map = new NamespaceMap();
        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);


        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, schemaNameSpace,
                    axisService.getSchematargetNamespacePrefix());
            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
            axisService.setElementFormDefault(false);
            excludeOpeartion.add("init");
            excludeOpeartion.add("setOperationContext");
            excludeOpeartion.add("destroy");
            excludeOpeartion.add("startUp");
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(schemaGenerator.generateSchema());
            axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
            axisService.setTypeTable(schemaGenerator.getTypeTable());
            if (targetNameSpace == null) {
                targetNameSpace = schemaGenerator.getSchemaTargetNameSpace();
            }
            if (targetNameSpace != null && !"".equals(targetNameSpace)) {
                axisService.setTargetNamespace(targetNameSpace);
            }
        } 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

        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);
        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
                serviceClass.trim(), axisService.getSchematargetNamespace(),
                axisService.getSchematargetNamespacePrefix());
        schemaGenerator.setExcludeMethods(excludeOperations);
        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();
        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();


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

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

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        ArrayList excludeOpeartion = new ArrayList();


        NamespaceMap map = new NamespaceMap();
        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);


        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, schemaNamespace,
                    axisService.getSchematargetNamespacePrefix());
            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
            axisService.setElementFormDefault(false);
            excludeOpeartion.add("init");
            excludeOpeartion.add("setOperationContext");
            excludeOpeartion.add("destroy");
            excludeOpeartion.add("startUp");
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(schemaGenerator.generateSchema());
            axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
            axisService.setTypeTable(schemaGenerator.getTypeTable());
            if (targetNamespace == null) {
                targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
            }
            if (targetNamespace != null && !"".equals(targetNamespace)) {
                axisService.setTargetNamespace(targetNamespace);
            }
        } catch (Exception e) {
            throw new AxisFault(e);
        }

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

        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();

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

        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);
        String serviceClass = (String) implInfoParam.getValue();
        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
                serviceClass.trim(), axisService.getSchematargetNamespace(),
                axisService.getSchematargetNamespacePrefix());
        schemaGenerator.setExcludeMethods(excludeOperations);
        Collection schemas = schemaGenerator.generateSchema();
        axisService.addSchema(schemas);

        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

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

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, axisService.getSchematargetNamespace(),
                    axisService.getSchematargetNamespacePrefix());
            ArrayList excludeOpeartion = new ArrayList();
            excludeOpeartion.add("init");
            excludeOpeartion.add("setOperationContext");
            excludeOpeartion.add("destroy");
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(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

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

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                    implClass, scheamNameSpace,
                    axisService.getSchematargetNamespacePrefix());
            ArrayList excludeOpeartion = new ArrayList();
            excludeOpeartion.add("init");
            excludeOpeartion.add("setOperationContext");
            excludeOpeartion.add("destroy");
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(schemaGenerator.generateSchema());
            if (targetNameSpace != null && !"".equals(targetNameSpace)) {
                axisService.setTargetNamespace(targetNameSpace);
            }
        } 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

        axisService.setName(serviceName);
        axisService.setClassLoader(loader);

        ClassLoader serviceClassLoader = axisService.getClassLoader();
        SchemaGenerator schemaGenerator;
        ArrayList excludeOpeartion = new ArrayList();


        NamespaceMap map = new NamespaceMap();
        map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
                Java2WSDLConstants.AXIS2_XSD);
        map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        axisService.setNameSpacesMap(map);


        try {
            schemaGenerator = new SchemaGenerator(serviceClassLoader,
                                                  implClass, schemaNamespace,
                                                  axisService.getSchematargetNamespacePrefix());
            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
            axisService.setElementFormDefault(false);
            Utils.addExclueMethods(excludeOpeartion);
            schemaGenerator.setExcludeMethods(excludeOpeartion);
            axisService.addSchema(schemaGenerator.generateSchema());
            axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
            axisService.setTypeTable(schemaGenerator.getTypeTable());
            if (targetNamespace == null) {
                targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
            }
            if (targetNamespace != null && !"".equals(targetNamespace)) {
                axisService.setTargetNamespace(targetNamespace);
            }
        } catch (Exception e) {
            throw new AxisFault(e);
        }

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

        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();

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

TOP

Related Classes of org.apache.ws.java2wsdl.SchemaGenerator

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.