Search in sources :

Example 1 with XMLStreamReader

use of org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader in project camel by apache.

the class XmlBeansConverterTest method toXmlObjectFromXMLStreamReader.

@Test
public void toXmlObjectFromXMLStreamReader() throws Exception {
    XmlObject result = XmlBeansConverter.toXmlObject(new XMLStreamReader(new ByteArrayInputStream(PAYLOAD.getBytes()), false), new DefaultExchange(new DefaultCamelContext()));
    assertBuyStocks(result);
}
Also used : DefaultExchange(org.apache.camel.impl.DefaultExchange) XMLStreamReader(org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader) ByteArrayInputStream(java.io.ByteArrayInputStream) XmlObject(org.apache.xmlbeans.XmlObject) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Test(org.junit.Test)

Aggregations

ByteArrayInputStream (java.io.ByteArrayInputStream)1 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)1 DefaultExchange (org.apache.camel.impl.DefaultExchange)1 XmlObject (org.apache.xmlbeans.XmlObject)1 XMLStreamReader (org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader)1 Test (org.junit.Test)1