Package org.apache.axis.utils

Examples of org.apache.axis.utils.Mapping


            clonedME.namespaces = new ArrayList();
            if(namespaces != null){
                for(int i = 0; i < namespaces.size(); i++){
                    //     jeus.util.Logger.directLog( " Debug :  namspace.size() = " + namespaces.size());
                    Mapping namespace = (Mapping)namespaces.get(i);
                    clonedME.addNamespaceDeclaration(namespace.getPrefix(), namespace.getNamespaceURI()); // why exception here!!
                }
            }
            clonedME.children = new ArrayList();

            // clear parents relationship to old parent
View Full Code Here


        } else {
            attrs = new AttributesImpl(attributes);
        }

        for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) {
            Mapping mapping = (Mapping) iterator.next();
            String prefix = mapping.getPrefix();
            String nsURI = mapping.getNamespaceURI();
            attrs.addAttribute(Constants.NS_URI_XMLNS, prefix,
                               "xmlns:" + prefix, nsURI, "CDATA");
        }
        return attrs;
    }
View Full Code Here

        if (href != null && getRealElement() != null) {
            return getRealElement().getPrefix(searchNamespaceURI);
        }

        for (int i = 0; namespaces != null && i < namespaces.size(); i++) {
            Mapping map = (Mapping) namespaces.get(i);
            if (map.getNamespaceURI().equals(searchNamespaceURI)) {
                return map.getPrefix();
            }
        }

        if (parent != null) {
            return ((MessageElement) parent).getPrefix(searchNamespaceURI);
View Full Code Here

        if (href != null && getRealElement() != null) {
            return getRealElement().getNamespaceURI(searchPrefix);
        }

        for (int i = 0; namespaces != null && i < namespaces.size(); i++) {
            Mapping map = (Mapping) namespaces.get(i);
            if (map.getPrefix().equals(searchPrefix)) {
                return map.getNamespaceURI();
            }
        }

        if (parent != null) {
            return ((MessageElement) parent).getNamespaceURI(searchPrefix);
View Full Code Here

        if (prefix != null)
            outputContext.registerPrefixForURI(prefix, namespaceURI);

        if (namespaces != null) {
            for (Iterator i = namespaces.iterator(); i.hasNext();) {
                Mapping mapping = (Mapping) i.next();
                outputContext.registerPrefixForURI(mapping.getPrefix(), mapping.getNamespaceURI());
            }
        }

        if (objectValue != null) {
            outputContext.serialize(new QName(namespaceURI, name),
View Full Code Here

     */
    public SOAPElement addNamespaceDeclaration(String prefix,
                                               String uri)
        throws SOAPException {
        try {
            Mapping map = new Mapping(uri, prefix);
            addMapping(map);
        } catch (RuntimeException t) {
            //TODO: why is this here? Nowhere else do we turn runtimes into SOAPExceptions.
            throw new SOAPException(t);
        }
View Full Code Here

            Node att = attrs.item(i);
        if (att.getNamespaceURI() != null &&
                att.getPrefix() != null &&
                att.getNamespaceURI().equals(Constants.NS_URI_XMLNS) &&
                "xmlns".equals(att.getPrefix())) {
                Mapping map = new Mapping(att.getNodeValue(), att.getLocalName());
                addMapping(map);
            }
            if(att.getLocalName() != null) {
                dest.addAttribute(att.getPrefix(),
                        (att.getNamespaceURI() != null ? att.getNamespaceURI() : ""),
View Full Code Here

            org.w3c.dom.Node att = attrs.item(i);
            if (att.getNamespaceURI() != null &&
                att.getPrefix() != null &&
                att.getNamespaceURI().equals(Constants.NS_URI_XMLNS) &&
                att.getPrefix().equals("xmlns")) {
                Mapping map = new Mapping(att.getNodeValue(), att.getLocalName());
                target.addMapping(map);
            }
            if (att.getLocalName() != null) {
                target.addAttribute(att.getPrefix(),
                  att.getNamespaceURI(),
View Full Code Here

        if (registerPrefixes) {
            if (namespaces == null)
                namespaces = new ArrayList();

            namespaces.add(new Mapping(soapConstants.getEnvelopeURI(),
                                       Constants.NS_PREFIX_SOAP_ENV));
            namespaces.add(new Mapping(Constants.URI_DEFAULT_SCHEMA_XSD,
                                       Constants.NS_PREFIX_SCHEMA_XSD));
            namespaces.add(new Mapping(Constants.URI_DEFAULT_SCHEMA_XSI,
                                       Constants.NS_PREFIX_SCHEMA_XSI));
        }
       
        setDirty(true);
    }
View Full Code Here

            }
        }

        ArrayList currentMappings = nsStack.peek();
        for (int i = 0; i < currentMappings.size(); i++) {
            Mapping map = (Mapping)currentMappings.get(i);
            StringBuffer sb = new StringBuffer("xmlns");
            if (!map.getPrefix().equals("")) {
                sb.append(":");
                sb.append(map.getPrefix());
            }
            if(vecQNames.indexOf(sb.toString())==-1){
                writer.write(" ");
                writer.write(sb.toString());
                writer.write("=\"");
                writer.write(map.getNamespaceURI());
                writer.write("\"");
            }
        }

        writingStartTag = true;
View Full Code Here

TOP

Related Classes of org.apache.axis.utils.Mapping

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.