Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLTypes


     * @param desc
     * @throws IOException
     */
    protected void writeTypes(WSDLDescription desc) throws IOException, XMLStreamException {
        //get the imports
        WSDLTypes types = desc.getTypes();
        if (types != null) {
            writer.writeStartElement(defaultWSDLPrefix, TYPES_NAME, WSDL1_1_NAMESPACE_URI);
            handleExtensibiltyElements(types.getExtensibilityElements());
            writer.writeEndElement();
        }
    }
View Full Code Here



    public WSDLInterface generatePortType(WSDLDescription womDescription,
                                          WSDLComponentFactory wsdlComponentFactory,
                                          Element documentElement) {
        WSDLTypes wsdlTypes = wsdlComponentFactory.createTypes();
        ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
        org.apache.wsdl.extensions.Schema schemaExtensibilityElement =
                (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
                        ExtensionConstants.SCHEMA);
        wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
        schemaExtensibilityElement.setElement(documentElement);
        womDescription.setTypes(wsdlTypes);

        WSDLInterface portType = womDescription.createInterface();
        portType.setName(new QName(serviceName + "Port"));
View Full Code Here

        //////////////////(1)First Copy the Types/////////////////////////////
        //Types may get changed inside the Operation pumping.

        Types wsdl4jTypes = wsdl4JDefinition.getTypes();
        WSDLTypes wsdlTypes = this.wsdlComponentFactory.createTypes();
        this.womDefinition.setTypes(wsdlTypes);

        if (null != wsdl4jTypes) {
            this.copyExtensibleElements(wsdl4jTypes.getExtensibilityElements(),
                    wsdlTypes, null);
        }

        //////////////////(1.5)s/////////////////////////////
//        create a new Schema extensions element
        Element schemaElement = generateWrapperSchema(wsdl4JDefinition);
        if (schemaElement!=null){
            ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
            org.apache.wsdl.extensions.Schema schemaExtensibilityElement = (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
                    ExtensionConstants.SCHEMA);
            wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
            schemaExtensibilityElement.setElement(schemaElement);
        }


        //schemaExtensibilityElement.setImportedSchemaStack();
View Full Code Here

     * @return
     */
    public WSDLInterface generatePortType(WSDLDescription womDescription,
                                          WSDLComponentFactory wsdlComponentFactory,
                                          Element documentElement) {
        WSDLTypes wsdlTypes = wsdlComponentFactory.createTypes();
        ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
        org.apache.wsdl.extensions.Schema schemaExtensibilityElement =
                (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
                        ExtensionConstants.SCHEMA);
        wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
        schemaExtensibilityElement.setElement(documentElement);
        womDescription.setTypes(wsdlTypes);

        WSDLInterface portType = womDescription.createInterface();
        portType.setName(new QName(serviceName + PORT_TYPE_SUFFIX));
View Full Code Here

        return womDescription;
    }

    private WSDLInterface generatePortType(WSDLDescription womDescription,
                                           WSDLComponentFactory wsdlComponentFactory, Element documentElement) {
        WSDLTypes wsdlTypes = wsdlComponentFactory.createTypes();
        ExtensionFactory extensionFactory = wsdlComponentFactory
                .createExtensionFactory();
        Schema schemaExtensibilityElement = (Schema) extensionFactory
                .getExtensionElement(ExtensionConstants.SCHEMA);
        wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
        schemaExtensibilityElement.setElement(documentElement);
        womDescription.setTypes(wsdlTypes);

        WSDLInterface portType = womDescription.createInterface();
        portType.setName(new QName(axisService.getName() + "Port"));
View Full Code Here

        //////////////////(1.1)First Copy the Types/////////////////////////////
        //Types may get changed inside the Operation pumping.

        Types wsdl4jTypes = wsdl4JDefinition.getTypes();
        WSDLTypes wsdlTypes = this.wsdlComponentFactory.createTypes();
        this.womDefinition.setTypes(wsdlTypes);

        if (null != wsdl4jTypes) {
            this.copyExtensibleElements(wsdl4jTypes.getExtensibilityElements(),
                    wsdlTypes, null);
        }

        //////////////////(1.2) /////////////////////////////
        // create new Schema extensions element for wrapping
        Element[] schemaElements = generateWrapperSchema(wsdl4JDefinition);
        if (schemaElements!=null && schemaElements.length>0){
            for (int i = 0; i < schemaElements.length; i++) {
                Element schemaElement = schemaElements[i];
                if (schemaElement!=null){
                    ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
                    org.apache.wsdl.extensions.Schema schemaExtensibilityElement = (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
                            ExtensionConstants.SCHEMA);
                    wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
                    schemaExtensibilityElement.setElement(schemaElement);
                }
            }
        }
View Full Code Here

     * @param desc
     * @throws IOException
     */
    protected void writeTypes(WSDLDescription desc) throws IOException, XMLStreamException {
        //get the imports
        WSDLTypes types = desc.getTypes();
        if (types != null) {
            writer.writeStartElement(defaultWSDLPrefix, TYPES_NAME, WSDL1_1_NAMESPACE_URI);
            handleExtensibiltyElements(types.getExtensibilityElements());
            writer.writeEndElement();
        }
    }
View Full Code Here

    }

    private WSDLInterface generatePortType(WSDLDescription womDescription,
                                           WSDLComponentFactory wsdlComponentFactory,
                                           Element documentElement) {
        WSDLTypes wsdlTypes = wsdlComponentFactory.createTypes();
        ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
        Schema schemaExtensibilityElement =
                (Schema) extensionFactory.getExtensionElement(
                        ExtensionConstants.SCHEMA);
        wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
        schemaExtensibilityElement.setElement(documentElement);
        womDescription.setTypes(wsdlTypes);

        WSDLInterface portType = womDescription.createInterface();
        portType.setName(new QName(axisService.getName() + "Port"));
View Full Code Here

        this.configuration = configuration;
    }

    public void engage() throws CodeGenerationException {
        //WSDLDescription wom = this.configuration.getWom();
        WSDLTypes typesList = configuration.getWom().getTypes();
        if (typesList == null) {
            //there are no types to be considered
            return;
        }
        Iterator iterator = typesList.getExtensibilityElements().iterator();
        while (iterator.hasNext()) {
            WSDLExtensibilityElement element = (WSDLExtensibilityElement) iterator.next();
            boolean targetnamespaceFound = false;
            if (ExtensionConstants.SCHEMA.equals(element.getType())) {
                Schema schema = (Schema) element;
View Full Code Here

        Element[] additionalSchemas = loadAdditionalSchemas();

        try {
            //get the types from the types section
            WSDLTypes typesList = configuration.getWom().getTypes();

            //check for the imported types. Any imported types are supposed to be here also
            if (typesList == null) {
                //there are no types to be code generated
                //However if the type mapper is left empty it will be a problem for the other
                //processes. Hence the default type mapper is set to the configuration
                this.configuration.setTypeMapper(new DefaultTypeMapper());
                return;
            }

            List typesArray = typesList.getExtensibilityElements();
            WSDLExtensibilityElement extensiblityElt;
            SchemaTypeSystem sts = null;
            Vector xmlObjectsVector= new Vector();
            //create the type mapper
            JavaTypeMapper mapper = new JavaTypeMapper();
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLTypes

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.