use of org.apache.cxf.databinding.stax.StaxDataBinding in project cxf by apache.
the class StaxDatabindingTest method testCallback.
@Test
public void testCallback() throws Exception {
String address = "local://foo";
ServerFactoryBean sf = new ServerFactoryBean();
sf.setServiceBean(new CallbackService());
sf.setTransportId(LocalTransportFactory.TRANSPORT_ID);
sf.setAddress(address);
sf.setDataBinding(new StaxDataBinding());
sf.getFeatures().add(new StaxDataBindingFeature());
sf.setBus(getBus());
sf.create();
Node res = invoke(address, LocalTransportFactory.TRANSPORT_ID, "req.xml");
assertValid("//bleh", res);
}
use of org.apache.cxf.databinding.stax.StaxDataBinding in project cxf by apache.
the class StaxDatabindingTest method testCopy.
@Test
public void testCopy() throws Exception {
String address = "local://foo";
ServerFactoryBean sf = new ServerFactoryBean();
sf.setServiceBean(new CopyService());
sf.setBus(getBus());
sf.setTransportId(LocalTransportFactory.TRANSPORT_ID);
sf.setAddress(address);
sf.setDataBinding(new StaxDataBinding());
sf.getFeatures().add(new StaxDataBindingFeature());
sf.create().start();
Node res = invoke(address, LocalTransportFactory.TRANSPORT_ID, "req.xml");
// DOMUtils.writeXml(res, System.out);
addNamespace("a", "http://stax.service.cxf.apache.org/");
assertValid("//a:bleh", res);
}
Aggregations