Examples of ExtensionFactory


Examples of org.apache.wsdl.extensions.ExtensionFactory

     * @param womExtensibleElements
     */
    private void copyExtensibleElements(List wsdl4jExtensibleElements,
                                        Component component) {
        Iterator iterator = wsdl4jExtensibleElements.iterator();
        ExtensionFactory extensionFactory = this.wsdlComponenetFactory
                .createExtensionFactory();
        while (iterator.hasNext()) {

            ExtensibilityElement wsdl4jElement = (ExtensibilityElement) iterator
                    .next();

            if (wsdl4jElement instanceof UnknownExtensibilityElement) {
                UnknownExtensibilityElement unknown = (UnknownExtensibilityElement) (wsdl4jElement);
                DefaultExtensibilityElement extensibilityElement = (DefaultExtensibilityElement) extensionFactory
                        .getExtensionElement(wsdl4jElement.getElementType());
                extensibilityElement.setElement(unknown.getElement());
                Boolean required = unknown.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            } else if (wsdl4jElement instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) wsdl4jElement;
                org.apache.wsdl.extensions.SOAPAddress extensibilityElement = (org.apache.wsdl.extensions.SOAPAddress) extensionFactory
                        .getExtensionElement(soapAddress.getElementType());
                extensibilityElement.setLocationURI(soapAddress
                        .getLocationURI());
                Boolean required = soapAddress.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            }else if(wsdl4jElement instanceof Schema) {
                Schema schema = (Schema)wsdl4jElement;
                org.apache.wsdl.extensions.Schema extensibilityElement = (org.apache.wsdl.extensions.Schema)extensionFactory.getExtensionElement(schema.getElementType());
                extensibilityElement.setElelment(schema.getElement());
                Boolean required = schema.getRequired();
                if(null != required){
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            }else if(SOAPConstants.Q_ELEM_SOAP_OPERATION.equals(wsdl4jElement.getElementType())){
                SOAPOperation soapOperation = (SOAPOperation)wsdl4jElement;
                org.apache.wsdl.extensions.SOAPOperation extensibilityElement = (org.apache.wsdl.extensions.SOAPOperation)extensionFactory.getExtensionElement(soapOperation.getElementType());
                extensibilityElement.setSoapAction(soapOperation.getSoapActionURI());
                extensibilityElement.setStyle(soapOperation.getStyle());
                Boolean required = soapOperation.getRequired();
                if(null != required){
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            }else if(SOAPConstants.Q_ELEM_SOAP_BODY.equals(wsdl4jElement.getElementType())){
                SOAPBody soapBody = (SOAPBody)wsdl4jElement;
                org.apache.wsdl.extensions.SOAPBody extensibilityElement = (org.apache.wsdl.extensions.SOAPBody)extensionFactory.getExtensionElement(soapBody.getElementType());
                extensibilityElement.setNamespaceURI(soapBody.getNamespaceURI());
                extensibilityElement.setUse(soapBody.getUse());
                Boolean required = soapBody.getRequired();
                if(null != required){
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            }else if(SOAPConstants.Q_ELEM_SOAP_BINDING.equals(wsdl4jElement.getElementType())){
                SOAPBinding soapBinding = (SOAPBinding)wsdl4jElement;
                org.apache.wsdl.extensions.SOAPBinding extensibilityElement = (org.apache.wsdl.extensions.SOAPBinding)extensionFactory.getExtensionElement(soapBinding.getElementType());
                extensibilityElement.setTransportURI(soapBinding.getTransportURI());
                extensibilityElement.setStyle(soapBinding.getStyle());
                Boolean required = soapBinding.getRequired();
                if(null != required){
                    extensibilityElement.setRequired(required.booleanValue());
View Full Code Here

Examples of org.apache.wsdl.extensions.ExtensionFactory

                    }
                    Document newDoc = documentBuilder.newDocument();

                    Element newSchemaElement = newDoc.createElementNS("http://www.w3.org/2001/XMLSchema", "schema");
                    types = wsdlComponentFactory.createTypes();
                    ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
                    org.apache.wsdl.extensions.Schema typesElement = (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
                            ExtensionConstants.SCHEMA);
                    typesElement.setElelment(newSchemaElement);
                    types.addExtensibilityElement(typesElement);
                    this.womDefinition.setTypes(types);
                }
View Full Code Here

Examples of org.apache.wsdl.extensions.ExtensionFactory

     * @param component
     */
    private void copyExtensibleElements(List wsdl4jExtensibleElements,
                                        Component component) {
        Iterator iterator = wsdl4jExtensibleElements.iterator();
        ExtensionFactory extensionFactory = this.wsdlComponentFactory
                .createExtensionFactory();
        while (iterator.hasNext()) {

            ExtensibilityElement wsdl4jElement = (ExtensibilityElement) iterator
                    .next();

            if (wsdl4jElement instanceof UnknownExtensibilityElement) {
                UnknownExtensibilityElement unknown = (UnknownExtensibilityElement) (wsdl4jElement);
                DefaultExtensibilityElement extensibilityElement = (DefaultExtensibilityElement) extensionFactory
                        .getExtensionElement(wsdl4jElement.getElementType());
                extensibilityElement.setElement(unknown.getElement());
                Boolean required = unknown.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            } else if (wsdl4jElement instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) wsdl4jElement;
                org.apache.wsdl.extensions.SOAPAddress extensibilityElement = (org.apache.wsdl.extensions.SOAPAddress) extensionFactory
                        .getExtensionElement(soapAddress.getElementType());
                extensibilityElement.setLocationURI(soapAddress
                        .getLocationURI());
                Boolean required = soapAddress.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            } else if (wsdl4jElement instanceof Schema) {
                Schema schema = (Schema) wsdl4jElement;
                //populate the imported schema stack
                Stack schemaStack = new Stack();
                //recursivly load the schema elements. The best thing is to push these into
                //a stack and then pop from the other side
                pushSchemaElement(schema, schemaStack);
                org.apache.wsdl.extensions.Schema extensibilityElement = (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
                        schema.getElementType());
                extensibilityElement.setElelment(schema.getElement());
                extensibilityElement.setImportedSchemaStack(schemaStack);
                Boolean required = schema.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            } else if (SOAPConstants.Q_ELEM_SOAP_OPERATION.equals(
                    wsdl4jElement.getElementType())) {
                SOAPOperation soapOperation = (SOAPOperation) wsdl4jElement;
                org.apache.wsdl.extensions.SOAPOperation extensibilityElement = (org.apache.wsdl.extensions.SOAPOperation) extensionFactory.getExtensionElement(
                        soapOperation.getElementType());
                extensibilityElement.setSoapAction(
                        soapOperation.getSoapActionURI());
                extensibilityElement.setStyle(soapOperation.getStyle());
                Boolean required = soapOperation.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            } else if (SOAPConstants.Q_ELEM_SOAP_BODY.equals(
                    wsdl4jElement.getElementType())) {
                SOAPBody soapBody = (SOAPBody) wsdl4jElement;
                org.apache.wsdl.extensions.SOAPBody extensibilityElement = (org.apache.wsdl.extensions.SOAPBody) extensionFactory.getExtensionElement(
                        soapBody.getElementType());
                extensibilityElement.setNamespaceURI(
                        soapBody.getNamespaceURI());
                extensibilityElement.setUse(soapBody.getUse());
                Boolean required = soapBody.getRequired();
                if (null != required) {
                    extensibilityElement.setRequired(required.booleanValue());
                }
                component.addExtensibilityElement(extensibilityElement);
            } else if (SOAPConstants.Q_ELEM_SOAP_BINDING.equals(
                    wsdl4jElement.getElementType())) {
                SOAPBinding soapBinding = (SOAPBinding) wsdl4jElement;
                org.apache.wsdl.extensions.SOAPBinding extensibilityElement = (org.apache.wsdl.extensions.SOAPBinding) extensionFactory.getExtensionElement(
                        soapBinding.getElementType());
                extensibilityElement.setTransportURI(
                        soapBinding.getTransportURI());
                extensibilityElement.setStyle(soapBinding.getStyle());
                Boolean required = soapBinding.getRequired();
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.extensions.ExtensionFactory

    }

    private ExtensionStack createExtensionStack()
    {
        WebSocketPolicy policy = WebSocketPolicy.newClientPolicy();
        ExtensionFactory factory = new WebSocketExtensionFactory(policy,bufferPool);
        return new ExtensionStack(factory);
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.extensions.ExtensionFactory

    @Override
    public Set<Extension> getInstalledExtensions()
    {
        Set<Extension> ret = new HashSet<>();
        ExtensionFactory extensions = client.getExtensionFactory();

        for (String name : extensions.getExtensionNames())
        {
            ret.add(new JsrExtension(name));
        }

        return ret;
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.extensions.ExtensionFactory

    @Override
    public Set<Extension> getInstalledExtensions()
    {
        Set<Extension> ret = new HashSet<>();
        ExtensionFactory extensions = client.getExtensionFactory();

        for (String name : extensions.getExtensionNames())
        {
            ret.add(new JsrExtension(name));
        }

        return ret;
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.