Package org.apache.axiom.om.impl.dom

Examples of org.apache.axiom.om.impl.dom.NamespaceImpl


    /* (non-Javadoc)
    * @see javax.xml.soap.SOAPElement#addChildElement(java.lang.String, java.lang.String, java.lang.String)
    */
    public SOAPElement addChildElement(String localName, String prefix, String uri)
            throws SOAPException {
        OMNamespace ns = new NamespaceImpl(uri, prefix);
        SOAPHeaderBlock headerBlock = null;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            headerBlock = new SOAP11HeaderBlockImpl(localName, ns, omSOAPHeader,
                                                    (SOAPFactory)this.element.getOMFactory());
        } else {
View Full Code Here


    /* (non-Javadoc)
    * @see javax.xml.soap.SOAPElement#addChildElement(javax.xml.soap.SOAPElement)
    */
    public SOAPElement addChildElement(SOAPElement soapElement) throws SOAPException {
        OMNamespace ns = new NamespaceImpl(soapElement.getNamespaceURI(),
                                           soapElement.getPrefix());
        SOAPHeaderBlock headerBlock = null;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            headerBlock = new SOAP11HeaderBlockImpl(soapElement.getLocalName(), ns,
                                                    omSOAPHeader,
View Full Code Here

        return soapHeaderElement;
    }

    @Override
    protected Element appendElement(ElementImpl child) throws SOAPException {    
        OMNamespace ns = new NamespaceImpl(child.getNamespaceURI(),
                                           child.getPrefix());
        SOAPHeaderBlock headerBlock = null;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            headerBlock = new SOAP11HeaderBlockImpl(child.getLocalName(), ns,
                                                    omSOAPHeader,
View Full Code Here

                || name.getURI().trim().length() == 0) {
            throw new SOAPException("SOAP1.1 and SOAP1.2 requires all HeaderElements to have " +
                    "a namespace.");
        }
        String prefix = name.getPrefix() == null ? "" : name.getPrefix();
        OMNamespace ns = new NamespaceImpl(name.getURI(), prefix);

        SOAPHeaderBlock headerBlock = null;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            headerBlock = new SOAP11HeaderBlockImpl(name.getLocalName(), ns, omSOAPHeader,
                                                    (SOAPFactory)this.element.getOMFactory());
View Full Code Here

     *                        this is a SOAP 1.1 Header.
     */

    public SOAPHeaderElement addNotUnderstoodHeaderElement(QName qname) throws SOAPException {
        SOAPHeaderBlock soapHeaderBlock = null;
        OMNamespace ns = new NamespaceImpl(qname.getNamespaceURI(), qname.getPrefix());
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            throw new UnsupportedOperationException();
        } else {
            soapHeaderBlock = this.omSOAPHeader.addHeaderBlock(
                    Constants.ELEM_NOTUNDERSTOOD, this.element.getNamespace());
View Full Code Here

        String prefix = "ns";
        while (iterator.hasNext()) {
            index++;
            String supported = (String)iterator.next();

            OMNamespace namespace = new NamespaceImpl(supported, prefix + index);

            if (this.element.getOMFactory() instanceof SOAP11Factory) {
                SOAP11HeaderBlockImpl supportedEnvelop =
                        new SOAP11HeaderBlockImpl(Constants.ELEM_SUPPORTEDENVELOPE,
                                                  namespace,
View Full Code Here

                alist.add(parseType(targetClazz, ((OMElement)children.next()).getText()));
            return alist.toArray((Object[]) Array.newInstance(targetClazz, alist.size()));
        } else if (XmlObject.class.isAssignableFrom(clazz)) {
            try {
                Class beanFactory = clazz.forName(clazz.getCanonicalName() + "$Factory");
                elmt.setNamespace(new NamespaceImpl(""));
                elmt.setLocalName("xml-fragment");
                return beanFactory.getMethod("parse", XMLStreamReader.class)
                        .invoke(null, elmt.getXMLStreamReaderWithoutCaching());
            } catch (ClassNotFoundException e) {
                throw new RuntimeException("Couldn't find class " + clazz.getCanonicalName() + ".Factory to instantiate xml bean", e);
View Full Code Here

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

        return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
    }

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

        return new SOAP12FaultDetailImpl(parent, builder, this);
    }

    public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
        OMNamespace ns =
                new NamespaceImpl(
                        SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                        SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
        SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
        createSOAPHeader(env);
        createSOAPBody(env);
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.impl.dom.NamespaceImpl

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.