Package org.apache.axis2.wsdl.codegen

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


                        targetnamespaceFound = true;
                        break;
                    }
                }
                if (!targetnamespaceFound)
                    throw new CodeGenerationException(
                            "Invalid WSDL: The WSDL Types Schema does not define a targetNamespace in "+schema.getName() );
            }

        }
    }
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("No language specific properties!!!");
        }

        String templateName = findTemplate(languageSpecificPropertyMap);
        if (templateName!=null){
            this.xsltStream = clazz.getResourceAsStream(templateName);
        }else{
            throw new CodeGenerationException("template for this writer is not found");
        }


    }
View Full Code Here

            // Do we need to enforce this here ?????
            // Perhaps we can introduce a flag to determine this!
            emitStub();

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

            }else{
                throw new Exception("Unknown code generation style!!! " + codegenStyle);
            }

        } 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
        //registered for -d none, we have to generate a new type mapper
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

                            infoHolder));
            // store the complex type name for this message
            message.addParameter(getParameter(Constants.COMPLEX_TYPE, complexType));

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

    }
View Full Code Here

            }


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

                        partNameList.add(
                                WSDLUtil.getPartQName(opName.getLocalPart(),
                                        WSDLConstants.INPUT_PART_QNAME_SUFFIX,
                                        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

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.