Package org.apache.axiom.om.impl.common

Examples of org.apache.axiom.om.impl.common.OMNamespaceImpl


        return SOAP11Version.getSingleton();
    }

    public SOAPEnvelope createSOAPEnvelope() {
        return new SOAPEnvelopeImpl(
                new OMNamespaceImpl(
                        SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                this);
    }
View Full Code Here


    public SOAPFaultDetail createSOAPFaultDetail() throws SOAPProcessingException {
        return new SOAP11FaultDetailImpl(this);
    }

    public OMNamespace getNamespace() {
        return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                                 SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
    }
View Full Code Here

    public void testSearch() throws Exception {
        String NSURI = "http://testns";
        String NSURI_UPPER = "HTTP://TESTNS";

        OMFactory fac = new OMDOMFactory();
        OMNamespace ns = new OMNamespaceImpl(NSURI, null);
        OMElement el = fac.createOMElement("foo", null);
        el.declareNamespace(NSURI, "p");
        assertNull(el.findNamespace(NSURI_UPPER, "p"));
    }
View Full Code Here

                new QName(soapEnvelopeNamespaceURI, attributeName));
        if (omAttribute != null) {
            omAttribute.setAttributeValue(attrValue);
        } else {
            OMAttribute attribute = new AttrImpl((DocumentImpl)getOwnerDocument(), attributeName,
                                                 new OMNamespaceImpl(soapEnvelopeNamespaceURI,
                                                                   SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                                                 attrValue, getOMFactory());
            this.addAttribute(attribute);
        }
    }
View Full Code Here

    public SOAPFaultDetail createSOAPFaultDetail() {
        return new SOAP11FaultDetailImpl(null, null, null, this, true);
    }

    public OMNamespace getNamespace() {
        return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                                 SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
    }
View Full Code Here

    public SOAPFaultDetail createSOAPFaultDetail() {
        return new SOAP12FaultDetailImpl(null, getNamespace(), null, this, true);
    }

    public OMNamespace getNamespace() {
        return new OMNamespaceImpl(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                                 SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
    }
View Full Code Here

        this(ownerDocument, factory);
        internalSetLocalName(name);
        //If this is a default namespace attr
        if (XMLConstants.XMLNS_ATTRIBUTE.equals(name)) {
            // TODO: this looks wrong; if the attribute name is "xmlns", then the prefix shouldn't be "xmlns"
            internalSetNamespace(new OMNamespaceImpl(
                    XMLConstants.XMLNS_ATTRIBUTE_NS_URI, XMLConstants.XMLNS_ATTRIBUTE));
        }
        this.type = OMConstants.XMLATTRTYPE_CDATA;
    }
View Full Code Here

        QName qname = getTextAsQName();
        if (qname == null) {
            return null;
        } else {
            String namespaceURI = qname.getNamespaceURI();
            return namespaceURI.length() == 0 ? null : new OMNamespaceImpl(namespaceURI, qname.getPrefix());
        }
    }
View Full Code Here

        OMNamespace namespace;
        if (namespaceURI == null) {
            namespace = null;
        } else {
            namespace = new OMNamespaceImpl(namespaceURI, prefix == null ? "" : prefix);
        }
        return new AttrImpl(this, localName, namespace, getOMFactory());
    }
View Full Code Here

        String localName = DOMUtil.getLocalName(qualifiedName);
        String prefix = DOMUtil.getPrefix(qualifiedName);
        DOMUtil.validateElementName(namespaceURI, localName, prefix);
       
        OMNamespaceImpl namespace;
        if (namespaceURI == null) {
            namespace = null;
        } else {
            namespace = new OMNamespaceImpl(namespaceURI, prefix == null ? "" : prefix);
        }
        ElementImpl element = new ElementImpl(null, localName, namespace, null, getOMFactory(), false);
        element.coreSetOwnerDocument(this);
        return element;
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.impl.common.OMNamespaceImpl

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.