Package org.codehaus.xfire.util.stax

Examples of org.codehaus.xfire.util.stax.FragmentStreamReader


    {
        try
        {
            IUnmarshallingContext mctx = bfact.createUnmarshallingContext();
            ElementReader r = (ElementReader) reader;
            FragmentStreamReader fsr = new FragmentStreamReader(r.getXMLStreamReader());
            fsr.next();
            StAXReaderWrapper wrapper = new StAXReaderWrapper(
                    fsr,
                    getSchemaType().getLocalPart(),
                    true);
View Full Code Here


        else if (Element.class.isAssignableFrom(p.getTypeClass()))
        {
            StaxBuilder builder = new StaxBuilder();
            try
            {
                org.jdom.Document doc = builder.build(new FragmentStreamReader(reader));
               
                if (doc.hasRootElement())
                    return doc.getRootElement();
                else
                    return null;
View Full Code Here

     */
    public IQ parseIQ(XmlPullParser parser)
        throws Exception
    {
        StaxBuilder builder = new StaxBuilder();
        FragmentStreamReader reader = new FragmentStreamReader(new XmlPullStreamReader(parser));
        reader.setAdvanceAtEnd(false);
       
        Document doc = builder.build(reader);

        return new SoapEnvelopePacket(doc);
    }
View Full Code Here

        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        try
        {
            XmlObject obj = XmlObject.Factory.parse(classLoader.getResourceAsStream("schemaorg_apache_xmlbeans/src/" + name));
           
            schema = builder.build(new FragmentStreamReader(obj.newXMLStreamReader())).getRootElement();
           
            String ns = xbeanType.getSchemaType().getNamespaceURI();
            String expr = "//xsd:schema[@targetNamespace='" + ns + "']";

            List nodes = getMatches(schema, expr);
View Full Code Here

    public void onReceive(MessageContext context, InMessage msg)
    {
        StaxBuilder builder = new StaxBuilder();
        try
        {
            message = builder.build(new FragmentStreamReader(msg.getXMLStreamReader()));
        }
        catch (XMLStreamException e)
        {
            e.printStackTrace();
        }
View Full Code Here

        throws XFireFault
    {
        try
        {
            XMLStreamReader reader = ((ElementReader) mreader).getXMLStreamReader();
            return STAXUtils.read(builder, new FragmentStreamReader(reader), true);
        }
        catch (XMLStreamException e)
        {
            throw new XFireFault("Could not parse xml.", e, XFireFault.SENDER);
        }
View Full Code Here

                            fault.setRole(reader.getElementText());
                        }
                        else if (reader.getLocalName().equals("detail"))
                        {
                            StaxBuilder builder = new StaxBuilder();
                            fault.setDetail(builder.build(new FragmentStreamReader(reader)).getRootElement());
                        }
                        break;
                    default:
                        break;
                }
View Full Code Here

                            fault.setRole(reader.getElementText());
                        }
                        else if (reader.getLocalName().equals("Detail"))
                        {
                            StaxBuilder builder = new StaxBuilder();
                            fault.setDetail(builder.build(new FragmentStreamReader(reader)).getRootElement());
                        }
                        break;
                    default:
                        break;
                }
View Full Code Here

    {
        StaxBuilder builder = new StaxBuilder();

        InMessage msg = context.getInMessage();

        FragmentStreamReader fsr = new FragmentStreamReader( msg.getXMLStreamReader() );
        fsr.setAdvanceAtEnd( false );
        builder.setAdditionalNamespaces(namespaces);
        Element header = builder.build( fsr ).getRootElement();


        context.getInMessage().setHeader(header);
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.util.stax.FragmentStreamReader

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.