Examples of WSDLDescription


Examples of org.apache.wsdl.WSDLDescription

    public WSDLVersionWrapper build(InputStream in,
                                    WSDLComponentFactory wsdlComponentFactory) throws WSDLException {
        if(null == wsdlComponentFactory){
            wsdlComponentFactory = new WSDLDescriptionImpl();
        }
        WSDLDescription wsdlDescription = wsdlComponentFactory.createDescription();

        Definition wsdl1Definition = this.readInTheWSDLFile(in);
        WSDLPump pump = new WSDLPump(wsdlDescription, wsdl1Definition);
        pump.pump();
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

    public WSDLVersionWrapper build(String uri,
                                    WSDLComponentFactory wsdlComponentFactory) throws WSDLException {
        if(null == wsdlComponentFactory){
            wsdlComponentFactory = new WSDLDescriptionImpl();
        }
        WSDLDescription wsdlDescription = wsdlComponentFactory.createDescription();

        Definition wsdl1Definition = this.readInTheWSDLFile(uri);
        WSDLPump pump = new WSDLPump(wsdlDescription,
                wsdl1Definition,
                wsdlComponentFactory);
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

    }

    public void generateWSDL() throws Exception {
        SchemaGenerator sg = new SchemaGenerator(classLoader, className,null,null);
        XmlSchema scheam = sg.generateSchema();
        WSDLDescription wommodel = new Java2WOM(
                sg.getTypeTable(), sg.getMethods(), scheam, className,null,null).generateWOM();
        WOMWriter womWriter = WOMWriterFactory.createWriter(WSDLConstants.WSDL_1_1);
        womWriter.setdefaultWSDLPrefix("wsdl");
        womWriter.writeWOM(wommodel, out);
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

        this.configuration = config;
        loadExtensions();
    }

    public CodeGenerationEngine(CommandLineOptionParser parser) throws CodeGenerationException {
        WSDLDescription wom;
        try {
            wom = this.getWOM(parser);
        } catch (WSDLException e) {
            throw new CodeGenerationException("Error parsing WSDL", e);
        } catch (IOException e1) {
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

    public void init(CodeGenConfiguration configuration) {
        this.configuration = configuration;
    }

    public void engage() {
        WSDLDescription wom = this.configuration.getWom();
        Map bindingMap = wom.getBindings();
        Vector bindingVector = new Vector();

        if (bindingMap==null || bindingMap.isEmpty()) {
            log.info(" bindings are not present in the original document");
            //just fall through
        }else{
            Collection bindingCollection = bindingMap.values();
            for (Iterator iterator = bindingCollection.iterator(); iterator.hasNext();) {

                WSDLBinding binding = (WSDLBinding)iterator.next();

                WSDLBinding newBinding = wom.createBinding();
                newBinding.setName(AXIS_BINDING_QNAME);

                WSDLInterface boundInterface = binding.getBoundInterface();
                newBinding.setBoundInterface(boundInterface);

                newBinding.setBindingFaults(binding.getBindingFaults());
                newBinding.setBindingOperations(binding.getBindingOperations());
                Iterator elementIterator = binding.getExtensibilityElements().iterator();
                while (elementIterator.hasNext()) {
                    newBinding.addExtensibilityElement(
                            (WSDLExtensibilityElement) elementIterator.next());
                }

                Iterator attributeIterator = binding.getExtensibilityAttributes()
                        .iterator();
                while (attributeIterator.hasNext()) {
                    newBinding.addExtensibleAttributes(
                            (WSDLExtensibilityAttribute) attributeIterator.next());
                }
                bindingVector.add(newBinding);

            }
            //drop all the bindings and add the new ones
            wom.getBindings().clear();
            for (int i = 0; i < bindingVector.size(); i++) {
                wom.addBinding ((WSDLBinding) bindingVector.get(i));
            }

        }
    }
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

                * or give a (custom) progress monitor to the generate() method, so
                * we will be informed by Axis2 about the progress of code generation. 
                */
               WSDL2JavaGenerator generator = new WSDL2JavaGenerator();
               monitor.subTask(CodegenWizardPlugin.getResourceString("generator.readingWOM"));
               WSDLDescription wom = generator.getWOM(wsdlSelectionPage.getFileName());
               monitor.worked(1);
              
               Map optionsMap = generator.fillOptionMap(optionsPage.isAsyncOnlyOn(),
                                         optionsPage.isSyncOnlyOn(),
                                         optionsPage.isServerside(),
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

    private AxisService processWSDLFile(InputStream in) throws DeploymentException {
        try {
            WOMBuilder builder = WOMBuilderFactory.getBuilder(WSDLConstants.WSDL_1_1);
            WSDLVersionWrapper wsdlVersionWrapper = builder.build(in,
                    new AxisDescWSDLComponentFactory());
            WSDLDescription womDescription = wsdlVersionWrapper.getDescription();

            //removing binding
//            Map bindings = wsdlVersionWrapper.getDefinition().getBindings();
//            Iterator binfingIterator = bindings.keySet().iterator();
//            while (binfingIterator.hasNext()) {
//                Object o = binfingIterator.next();
//                bindings.remove(o) ;
//
//            }
            Iterator iterator = womDescription.getServices().keySet()
                    .iterator();
            if (iterator.hasNext()) {
                // remove <wsdl:service> and <wsdl:binding> elements from the service
                // description we read in as we will be replacing them anyway.
                WSDLServiceImpl serviceimpl = (WSDLServiceImpl)
                        womDescription.getServices().get(iterator.next());
                AxisService service = new AxisService(serviceimpl);
                service.setName(serviceimpl.getName());
                service.setWSDLDefinition(wsdlVersionWrapper.getDefinition());
                return service;
//                depengine.getCurrentFileItem().addService(service);
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

     *
     * @param parser
     * @throws CodeGenerationException
     */
    public CodeGenerationEngine(CommandLineOptionParser parser) throws CodeGenerationException {
        WSDLDescription wom;
        Map allOptions = parser.getAllOptions();
        String wsdlUri;
        try {

            CommandLineOption option = (CommandLineOption)allOptions.get(CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION);
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

    public String getTargetURI() {
        return getDescription().getTargetNameSpace();
    }

    private void populateSchemaRegistry() {
        WSDLDescription des = getDescription();
        WSDLTypes types = des.getTypes();

        Iterator iterator = types.getExtensibilityElements().iterator();
        while (iterator.hasNext()) {
            Object extElement = iterator.next();
            if (extElement instanceof Schema) {
View Full Code Here

Examples of org.apache.wsdl.WSDLDescription

        }
    }

    private void populatePolicyRegistry() {
        Iterator iterator;
        WSDLDescription des = getDescription();
        List extElements = des.getExtensibilityElements();
        registerPoliciesAsElements(extElements);

        iterator = des.getWsdlInterfaces().values().iterator();
        while (iterator.hasNext()) {
            WSDLInterface interfaze = (WSDLInterface) iterator.next();
            registerPoliciesInWSDLInterface(interfaze);
        }

        iterator = des.getBindings().values().iterator();
        while (iterator.hasNext()) {
            WSDLBinding wsdlBinding = (WSDLBinding) iterator.next();
            registerPoliciesInWSDLBinding(wsdlBinding);
        }

        iterator = des.getServices().values().iterator();
        while (iterator.hasNext()) {
            WSDLService service = (WSDLService) iterator.next();
            registerPoliciesInService(service);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.