Package org.apache.axis2.util

Examples of org.apache.axis2.util.StreamWrapper


        //we need the wrapper here - it is the nature of the builders that
        //they expect the *next* event to be the start element (not the
        //current one) So we need the wrapper to simulate a full fledged
        //
        NamedStaxOMBuilder  sm = new NamedStaxOMBuilder(
                new StreamWrapper(reader),nameToMatch);
        OMElement elt = sm.getOMElement();

        assertNotNull(elt);
        assertEquals(elt.getLocalName(),"myIntVal");

View Full Code Here


            elementList.add(new Header());
            elementList.add(new QName(qName.getNamespaceURI(), "Body",
                                      SOAPConstants.BODY_NAMESPACE_PREFIX));
            elementList.add(body);
            return
                    new StreamWrapper(new org.apache.axis2.databinding.utils.reader.
                            ADBXMLStreamReaderImpl(qName, elementList.toArray(), null));
        }
View Full Code Here

        doc.setAdviceReq(req);

        //get the pull parser and construct the OMElement
        StAXOMBuilder builder = new StAXOMBuilder(
                OMAbstractFactory.getOMFactory(),
                new StreamWrapper(doc.newXMLStreamReader())
        );
        OMElement elt = builder.getDocumentElement();

        //traverse the element and look at the namespace of the attribute
        OMAttribute att =
View Full Code Here

                }
                XMLStreamReader xr = BeanUtil.getPullParser(resObject,
                        returnWrapper, typeTable, qualified, false);
                StAXOMBuilder stAXOMBuilder =
                        OMXMLBuilderFactory.createStAXOMBuilder(
                                OMAbstractFactory.getOMFactory(), new StreamWrapper(xr));
                OMElement documentElement = stAXOMBuilder.getDocumentElement();
                if (documentElement != null) {
                    bodyContent.addChild(documentElement);
                }
            }
View Full Code Here

            QName returnWrapper = new QName(ns.getNamespaceURI(), partName, ns.getPrefix());
            XMLStreamReader xr = BeanUtil.getPullParser(resObject,
                    returnWrapper, typeTable, qualified, true);
            StAXOMBuilder stAXOMBuilder =
                    OMXMLBuilderFactory.createStAXOMBuilder(
                            OMAbstractFactory.getOMFactory(), new StreamWrapper(xr));
            OMElement documentElement = stAXOMBuilder.getDocumentElement();
            if (documentElement != null) {
                envelope.getBody().addChild(documentElement);
            }
        }
View Full Code Here

                    service.getSchemaTargetNamespacePrefix());
        } else {
            resName = new QName(partName);
        }
        XMLStreamReader xr = new NullXMLStreamReader(resName);
        StreamWrapper parser = new StreamWrapper(xr);
        StAXOMBuilder stAXOMBuilder =
                OMXMLBuilderFactory.createStAXOMBuilder(
                        OMAbstractFactory.getSOAP11Factory(), parser);
        envelope.getBody().addChild(stAXOMBuilder.getDocumentElement());
    }
View Full Code Here

                        service.getSchemaTargetNamespacePrefix());
            } else {
                resName = new QName(RETURN_WRAPPER);
            }
            XMLStreamReader xr = new NullXMLStreamReader(resName);
            StreamWrapper parser = new StreamWrapper(xr);
            StAXOMBuilder stAXOMBuilder =
                    OMXMLBuilderFactory.createStAXOMBuilder(
                            OMAbstractFactory.getSOAP11Factory(), parser);
            ns = fac.createOMNamespace(service.getSchematargetNamespace(),
                    service.getSchemaTargetNamespacePrefix());
View Full Code Here

        }

        XMLStreamReader xr =
                new ADBXMLStreamReaderImpl(opName, objects.toArray(), null, typeTable, qualifed);

        StreamWrapper parser = new StreamWrapper(xr);
        StAXOMBuilder stAXOMBuilder =
                OMXMLBuilderFactory.createStAXOMBuilder(
                        OMAbstractFactory.getSOAP11Factory(), parser);
        return stAXOMBuilder.getDocumentElement();
    }
View Full Code Here

        StreamingOMSerializer ser = new StreamingOMSerializer();
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(byteArrayOutputStream);
        ser.serialize(
                new StreamWrapper(reader),
                writer);
        writer.flush();
        return byteArrayOutputStream.toString();
    }
View Full Code Here

        //we need the wrapper here - it is the nature of the builders that
        //they expect the *next* event to be the start element (not the
        //current one) So we need the wrapper to simulate a full fledged
        //
        NamedStaxOMBuilder sm = new NamedStaxOMBuilder(
                new StreamWrapper(reader), nameToMatch);
        OMElement elt = sm.getOMElement();

        assertNotNull(elt);
        assertEquals(elt.getLocalName(), "myIntVal");

View Full Code Here

TOP

Related Classes of org.apache.axis2.util.StreamWrapper

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.