Package org.apache.axis2.wsdl.codegen

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


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



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

                if (s.getElements().isEmpty()&&
                        s.getSchemaTypes().isEmpty() &&
                        s.getGroups().isEmpty() &&
                        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

            QName opName = message.getAxisOperation().getName();
            partNameList.add(WSDLUtil.getPartQName(opName.getLocalPart(),
                    qnameSuffix,
                    schemaElement.getQName().getLocalPart()));
        } else if (schemaType == null) {
            throw new CodeGenerationException("Can not determine the schema type for the "
                    + schemaElement.getName());
        } else {
            //we've no idea how to unwrap a non complexType!!!!!!
            throw new CodeGenerationException(
                    CodegenMessages.getMessage("extension.unsupportedSchemaFormat",
                            schemaType.getName(), "complexType"));
        }


        try {
            //set in the axis message that the unwrapping was success
            message.addParameter(getParameter(
                    Constants.UNWRAPPED_KEY,
                    Boolean.TRUE));

            // attach the opName and the parts name list into the
            // axis message by using the holder
            MessagePartInformationHolder infoHolder = new MessagePartInformationHolder();
            infoHolder.setOperationName(message.getAxisOperation().getName());
            infoHolder.setPartsList(partNameList);

            //attach it to the parameters
            message.addParameter(
                    getParameter(Constants.UNWRAPPED_DETAILS,
                            infoHolder));

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

    }
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

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

            writeWSDLFiles();

        }catch(CodeGenerationException cgExp){
            throw cgExp;
        }catch(Exception e){
            throw new CodeGenerationException(e);
        }
    }
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

        if (configuration.getDatabindingType() == XSLTConstants.DataBindingTypes.NONE){
            configuration.setTypeMapper(new DefaultTypeMapper());
        }else{
            if (mappper==null){
                //this shouldn't happen
                throw new CodeGenerationException("No proper databinding has taken place");
            }
        }

    }
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.