Package org.apache.axis2.wsdl.codegen

Examples of org.apache.axis2.wsdl.codegen.CodeGenerationException



        } catch (CodeGenerationException cgExp) {
            throw cgExp;
        } catch (Exception e) {
            throw new CodeGenerationException(e);
        }
    }
View Full Code Here


            message.addParameter(
                    getParameter(Constants.UNWRAPPED_DETAILS,
                                 infoHolder));

        } catch (AxisFault axisFault) {
            throw new CodeGenerationException(axisFault);
        }

    }
View Full Code Here

            // handle attributes here
            processAttributes(cmplxType, message, partNameList, qnameSuffix);

        } else {
            //we've no idea how to unwrap a non complexType!!!!!!
            throw new CodeGenerationException(
                    CodegenMessages.getMessage("extension.unsupportedSchemaFormat",
                                               "unknown", "complexType"));
        }
    }
View Full Code Here

                    partNameList.add(
                            WSDLUtil.getPartQName(opName.getLocalPart(),
                                                  qnameSuffix,
                                                  Constants.ANY_ELEMENT_FIELD_NAME));
                } else {
                    throw new CodeGenerationException(
                            CodegenMessages.getMessage("extension.unsupportedSchemaFormat",
                                                       "unknown type", "Element"));
                }
            }

            //we do not know how to deal with other particles
            //such as xs:all or xs:choice. Usually occurs when
            //passed with the user built WSDL where the style
            //is document.
        } else if (schemaParticle instanceof XmlSchemaChoice) {
            throw new CodeGenerationException(
                    CodegenMessages.getMessage("extension.unsupportedSchemaFormat",
                                               "choice", "sequence"));

        } else if (schemaParticle instanceof XmlSchemaAll) {
            throw new CodeGenerationException(
                    CodegenMessages.getMessage("extension.unsupportedSchemaFormat",
                                               "all", "sequence"));
        } else {
            throw new CodeGenerationException(
                    CodegenMessages.getMessage("extension.unsupportedSchemaFormat",
                                               "unknown", "sequence"));
        }
    }
View Full Code Here

        //first get the language specific property map
        Class clazz = this.getClass();
        Map languageSpecificPropertyMap =
                (Map)ConfigPropertyFileLoader.getLanguageSpecificPropertiesMap().get(this.language);
        if (languageSpecificPropertyMap == null) {
            throw new CodeGenerationException(
                    CodegenMessages.getMessage("writer.noLangPropertiesExtension"));
        }

        String templateName = findTemplate(languageSpecificPropertyMap);
        if (templateName != null) {
            this.xsltStream = clazz.getResourceAsStream(templateName);
        } else {
            throw new CodeGenerationException(CodegenMessages.getMessage("writer.templateMissing"));
        }


    }
View Full Code Here

            //mix databinding types!

            String databindingName = rootMappingsElement.
                    getAttribute(DB_FRAMEWORK_ATTRIBUTE_NAME);
            if (!databindingName.equals(configuration.getDatabindingType())) {
                throw new CodeGenerationException(
                        CodegenMessages.
                                getMessage("extension.databindingMismatch")
                );
            }
            configuration.
View Full Code Here

            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder =
                    documentBuilderFactory.newDocumentBuilder();
            return documentBuilder.parse(configuration.getTypeMappingFile());
        } catch (Exception e) {
            throw new CodeGenerationException(e);
        }
    }
View Full Code Here

            //not yet being set, then there's a problem.
            //Hence check the mapper status here

            if (mapper == null) {
                //this shouldn't happen
                throw new CodeGenerationException(
                        CodegenMessages.getMessage("extension.noProperDatabinding"));
            }
            return;
        }
        //the mapper has not been populated yet. since this extension is
View Full Code Here

                if (s.getElements().getCount() == 0 &&
                        s.getSchemaTypes().getCount() == 0 &&
                        s.getGroups().getCount() == 0 &&
                        s.getTargetNamespace() == null) {
                    // if there's no targetNamespace there's probably no name, but try it anyway
                    throw new CodeGenerationException(
                            CodegenMessages.getMessage("extension.invalidWSDL", s.toString()));
                }

            }
        }
View Full Code Here

            // A check to avoid nasty surprises - Since unwrapping is not
            // supported by all frameworks, we check the framework name to be
            // compatible
            if (!ConfigPropertyFileLoader.getUnwrapSupportedFrameworkNames().
                    contains(configuration.getDatabindingType())) {
                throw new CodeGenerationException(
                        CodegenMessages.getMessage("extension.unsupportedforunwrapping"));
            } else if (!ConfigPropertyFileLoader.getUnwrapDirectFrameworkNames().
                    contains(configuration.getDatabindingType())) {

                //walk the schema and find the top level elements
View Full Code Here

TOP

Related Classes of org.apache.axis2.wsdl.codegen.CodeGenerationException

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.