Package org.apache.axiom.om.impl

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


                    if (contentID == null) {
                        contentID = writer.getNextContentId();
                    }
                    // send binary as MTOM optimised
                    this.attribute = new OMAttributeImpl("href",
                                                         new OMNamespaceImpl("", ""),
                                                         "cid:" + getContentID(), this.factory);
                    this.serializeStartpart(writer);
                    writer.writeOptimized(this);
                    writer.writeEndElement();
                } else {
View Full Code Here


        super(testName);
    }

    protected void setUp() throws Exception {
        element = new OMSourcedElementImpl("library",
            new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", ""),
                new OMLinkedListImplFactory(), new TestDataSource(testDocument));
    }
View Full Code Here

     */
    public OMNamespace createOMNamespace(String uri, String prefix) {
        String key = uri + uriAndPrefixSeparator + prefix;
        OMNamespace existingNamespaceObject = (OMNamespace) namespaceTable.get(key);
        if (existingNamespaceObject == null) {
            existingNamespaceObject = new OMNamespaceImpl(uri, prefix);
            namespaceTable.put(key, existingNamespaceObject);
        }
        return existingNamespaceObject;
    }
View Full Code Here

        mtomOutputFormat.setDoOptimize(true);
        OMOutputFormat baseOutputFormat = new OMOutputFormat();
        baseOutputFormat.setDoOptimize(false);

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespaceImpl soap = new OMNamespaceImpl(
                "http://schemas.xmlsoap.org/soap/envelope/", "soap");
        OMElement envelope = new OMElementImpl("Envelope", soap, fac);
        OMElement body = new OMElementImpl("Body", soap, fac);

        OMNamespaceImpl dataName = new OMNamespaceImpl(
                "http://www.example.org/stuff", "m");
        OMElement data = new OMElementImpl("data", dataName, fac);

        FileDataSource dataSource = new FileDataSource(getTestResourceFile(imageInFileName));
        expectedDH = new DataHandler(dataSource);
View Full Code Here

                    if (contentID == null) {
                        contentID = writer.getNextContentId();
                    }
                    // send binary as MTOM optimised
                    this.attribute = new OMAttributeImpl("href",
                            new OMNamespaceImpl("", ""), "cid:" + getContentID(), this.factory);
                    this.serializeStartpart(writer);
                    writer.writeOptimized(this);
                    writer.writeEndElement();
                } else {
                    //do normal base64
View Full Code Here

     * @return Returns namespace.
     */
    public OMNamespace declareNamespace(String uri, String prefix) {
        if ("".equals(prefix))
            prefix = OMSerializerUtil.getNextNSPrefix();
        OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix);
        return declareNamespace(ns);
    }
View Full Code Here

     *
     * @param uri
     */
    public OMNamespace declareDefaultNamespace(String uri) {

        OMNamespaceImpl namespace = new OMNamespaceImpl(uri == null ? "" : uri, "");

        if (namespaces == null) {
            this.namespaces = new HashMap(5);
        }
        namespaces.put("", namespace);
View Full Code Here

            this.namespaces = new HashMap(5);
        }
        String prefix = namespace.getPrefix();
        if (prefix == null) {
            prefix = OMSerializerUtil.getNextNSPrefix();
            namespace = new OMNamespaceImpl(namespace.getNamespaceURI(), prefix);
        }
        namespaces.put(prefix, namespace);
        return namespace;
    }
View Full Code Here

    public SOAPVersion getSOAPVersion() {
        return SOAP12Version.getSingleton();
    }   

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

                                   SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
    }

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

TOP

Related Classes of org.apache.axiom.om.impl.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.