Examples of OMSourcedElementImpl


Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

        }
        String testData = buffer.toString();
        QName qname = new QName("data");
        OMDataSource ds = new WrappedTextNodeOMDataSourceFromReader(qname, new StringReader(testData));
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMSourcedElement element = new OMSourcedElementImpl(qname, factory, ds);
        assertEquals(testData, element.getText());
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     * @param source
     * @param localName
     * @param ns
     */
    public OMElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            trace.trace("Wrapping text transformation result from : " + file);
        }

        if (file != null) {
            TextFileDataSource txtFileDS = new TextFileDataSource(new FileDataSource(file));
            wrapper = new OMSourcedElementImpl(BaseConstants.DEFAULT_TEXT_WRAPPER, fac, txtFileDS);
        }

        return wrapper;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

        }
    }

    private static OMElement _createOMElementFromBlock(QName qName, Block b,
                                                       SOAPFactory soapFactory) {
        return new OMSourcedElementImpl(qName, soapFactory, b);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            SOAPFaultDetail detail = factory.createSOAPFaultDetail(soapFault);
            if (!ignoreDetailBlocks) {
                for (int i = 0; i < blocks.length; i++) {
                    // A Block implements OMDataSource.  So create OMSourcedElements
                    // for each of the Blocks.
                    OMSourcedElementImpl element =
                            new OMSourcedElementImpl(blocks[i].getQName(), factory, blocks[i]);
                    detail.addChild(element);
                }
            }
        }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            }
        } catch (IOException e) {
            throw AxisFault.makeFault(e);
        }
        JSONDataSource jsonDataSource = getDataSource(inputStream, prefix, localName);
        return new OMSourcedElementImpl(localName, ns, factory, jsonDataSource);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

    public void testWithXMLChars() throws Exception {
        String testString = "Test string with ampersand (&)";
        OMDataSource dataSource
            = new TextFileDataSource(new ByteArrayDataSource(testString.getBytes("UTF-8")));
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        OMSourcedElementImpl element
            = new OMSourcedElementImpl(BaseConstants.DEFAULT_TEXT_WRAPPER, omFactory, dataSource);
        assertEquals(testString, element.getText());
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     * @param source
     * @param localName
     * @param ns
     */
    public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            }
        } catch (IOException e) {
            throw AxisFault.makeFault(e);
        }
        JSONDataSource jsonDataSource = getDataSource(inputStream, prefix, localName);
        return new OMSourcedElementImpl(localName, ns, factory, jsonDataSource);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            bytes = baos.toByteArray();
        } catch (IOException e) {
            throw AxisFault.makeFault(e);
        }
        ByteArrayDataSourceEx ds = new ByteArrayDataSourceEx(bytes, contentType);
        return new OMSourcedElementImpl("dummy", ns, factory, ds);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.