Package org.apache.axis2.wsdl.codegen

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


            //writeTestSkeletonImpl(axisBinding);
            //write a testservice.xml that will load the dummy skeleton impl for testing
            //writeTestServiceXML(axisBinding);
        } catch (Exception e) {
            e.printStackTrace();
            throw new CodeGenerationException(e);
        }
    }
View Full Code Here


            // Call the emit stub method to generate the client side too
            emitStub();

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

                            attributes.item(i).getLocalName()))
                        targetnamespaceFound = true;
                }
            }
            if (!targetnamespaceFound)
                throw new CodeGenerationException(
                        "Invalid WSDL: The WSDL Types Schema does not define a targetNamespace");
        }
    }
View Full Code Here

            WSDLDescription wom = this.configuration.getWom();
            Map bindings = wom.getBindings();
            WSDLBinding axisBinding = null;
            WSDLService axisService = null;
            if (bindings==null){
                throw new CodeGenerationException("Binding needs to be present!");
            }

            Collection bindingCollection = bindings.values();
            for (Iterator iterator = bindingCollection.iterator(); iterator.hasNext();) {
                axisBinding  =  (WSDLBinding)iterator.next();

                //write interfaces
                Map services = wom.getServices();
                if (!services.isEmpty()) {
                    if (services.size() == 1) {
                        axisService = (WSDLService) services.values().toArray()[0];
                    } else {
                        throw new UnsupportedOperationException(
                                "Single service WSDL files only");
                    }
                }
                //
                writeInterface(axisBinding);
                //write interface implementations
                writeInterfaceImplementation(axisBinding, axisService);
                //write the call back handlers
                writeCallBackHandlers(axisBinding);
                //write the test classes
                writeTestClasses(axisBinding);
                //write the databinding supporters
                writeDatabindingSupporters(axisBinding);
                //write a dummy implementation call for the tests to run.
                //writeTestSkeletonImpl(axisBinding);
                //write a testservice.xml that will load the dummy skeleton impl for testing
                //writeTestServiceXML(axisBinding);
            }
        } catch (Exception e) {
            throw new CodeGenerationException(e);
        }
    }
View Full Code Here

            WSDLDescription wom = this.configuration.getWom();
            Map bindings = wom.getBindings();
            WSDLBinding axisBinding = null;

            if (bindings==null){
                throw new CodeGenerationException("Binding needs to be present!");
            }

            Collection bindingCollection = bindings.values();

            for (Iterator iterator = bindingCollection.iterator(); iterator.hasNext();) {
                axisBinding  =  (WSDLBinding)iterator.next();
                //write interfaces
                writeSkeleton(axisBinding);
                //write interface implementations
                writeServiceXml(axisBinding);
                //write the local test classes
//               writeLocalTestClasses(axisBinding);
                //write a dummy implementation call for the tests to run.
                //writeTestSkeletonImpl(axisBinding);
                //write a testservice.xml that will load the dummy skeleton impl for testing
                //writeTestServiceXML(axisBinding);
                //write a MessageReceiver for this particular service.
                writeMessageReceiver(axisBinding);
            }
            // Call the emit stub method to generate the client side too
            // Do we need to enforce this here ?????
            // Perhaps we can introduce a flag to determine this!
            emitStub();

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

    public void emitStub() throws CodeGenerationException {

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

     */
    public void emitSkeleton() throws CodeGenerationException {
        try {
            emitSkeletonService();
        } 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

            }

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