Package org.apache.wsif.wsdl.extensions.format

Examples of org.apache.wsif.wsdl.extensions.format.TypeMapping


        while (iterator.hasNext()) {
            javax.wsdl.extensions.ExtensibilityElement ee =
                (javax.wsdl.extensions.ExtensibilityElement) iterator.next();
            if (ee instanceof TypeMapping) {
                TypeMapping typeMapping = (TypeMapping) ee;
                String s = typeMapping.getEncoding();
                Trc.exit(s);
                return s;
            }
        }
View Full Code Here


        Trc.exit();
    }

    private void buildTypeMap() throws WSIFException {
      Trc.entry(this);
        TypeMapping typeMapping = null;

        // Get the TypeMappings from the binding
        Iterator bindingIterator =
            this.fieldPortModel.getBinding().getExtensibilityElements().iterator();
           
        // Choose the first typeMap that has encoding=Java and style=Java.
        // Ignore any other typeMap's that have other encodings and styles.
        while (bindingIterator.hasNext()) {
            Object next = bindingIterator.next();
            if (next instanceof TypeMapping) {
                typeMapping = (TypeMapping) next;
                if ("Java".equals(typeMapping.getEncoding()) &&
                    "Java".equals(typeMapping.getStyle()))
                    break;
                typeMapping = null;
            }
        }

        if (typeMapping == null) {
            QName bindingName = fieldPortModel.getBinding().getQName();
            throw new WSIFException(
                "Binding "
                    + (bindingName == null ? "<null>" : bindingName.toString())
                    + " does not contain a typeMap with encoding=Java and style=Java");
        }

        // Build the hashmap
        bindingIterator = typeMapping.getMaps().iterator();
        while (bindingIterator.hasNext()) {
            TypeMap typeMap = (TypeMap) bindingIterator.next();
            ///////////////////////////////////
            QName typeName = typeMap.getTypeName();
            if (typeName == null) typeName = typeMap.getElementName();
View Full Code Here

        Iterator iterator = bindingModel.getExtensibilityElements().iterator();
        String formatPackageName = null;
        while (iterator.hasNext()) {
            ExtensibilityElement ee = (ExtensibilityElement) iterator.next();
            if (ee instanceof TypeMapping) {
                TypeMapping typeMapping = (TypeMapping) ee;
                formatPackageName = typeMapping.getEncoding();
                if (typeMapping.getStyle() != null)
                    formatPackageName += typeMapping.getStyle();
            }
            if (formatPackageName != null)
                break;
        }
        String s = null;
View Full Code Here

        if (fieldTypeMapBuilt) {
          Trc.exit();
            return;
        }

        TypeMapping typeMapping = null;

        // Get the TypeMappings from the binding
        Iterator bindingIterator =
            fieldPortModel.getBinding().getExtensibilityElements().iterator();

        /*
         * Choose the first typeMap that has encoding=Java|EJB and style=Java.
         * Ignore any other typeMap's that have other encodings and styles.
         * We allow both encoding="Java" and encoding="EJB" because originally
         * WSIF did not check the encoding and our samples assumed Java, whereas
         * the tooling assumed EJB, and now because of backwards compatibility
         * we end up supporting both.
         */
        while (bindingIterator.hasNext()) {
            Object next = bindingIterator.next();
            if (next instanceof TypeMapping) {
                typeMapping = (TypeMapping) next;
                if (("Java".equals(typeMapping.getEncoding())
                    || "EJB".equals(typeMapping.getEncoding()))
                    && "Java".equals(typeMapping.getStyle()))
                    break;
                Trc.event(this, "Silently ignoring typemapping", typeMapping);
                typeMapping = null;
            }
            Trc.event(
                this,
                "Silently ignoring something that was not a typemapping",
                next);
        }

        if (typeMapping == null) {
            QName bindingName = fieldPortModel.getBinding().getQName();
            throw new WSIFException(
                "Binding "
                    + (bindingName == null ? "<null>" : bindingName.toString())
                    + " does not contain a typeMap with encoding=Java or encoding=EJB and style=Java");
        }

        // Build the hashmap
        bindingIterator = typeMapping.getMaps().iterator();
        while (bindingIterator.hasNext()) {
            TypeMap typeMap = (TypeMap) bindingIterator.next();
            ///////////////////////////////////
            QName typeName = typeMap.getTypeName();
            if (typeName == null) typeName = typeMap.getElementName();
View Full Code Here

TOP

Related Classes of org.apache.wsif.wsdl.extensions.format.TypeMapping

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.