use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class AegisWSDLNSTest method setupForTest.
private void setupForTest(boolean specifyWsdl) throws Exception {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(AegisJaxWsWsdlNs.class);
if (specifyWsdl) {
factory.setServiceName(new QName("http://v1_1_2.rtf2pdf.doc.ws.daisy.marbes.cz", "AegisJaxWsWsdlNsImplService"));
factory.setWsdlLocation("http://localhost:" + PORT + "/aegisJaxWsWSDLNS?wsdl");
}
factory.getServiceFactory().setDataBinding(new AegisDatabinding());
factory.setAddress("http://localhost:" + PORT + "/aegisJaxWsWSDLNS");
client = (AegisJaxWsWsdlNs) factory.create();
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class Server method startServer.
public static void startServer() throws Exception {
HelloWorldImpl helloworldImpl = new HelloWorldImpl();
ServerFactoryBean svrFactory = new ServerFactoryBean();
svrFactory.setServiceClass(HelloWorld.class);
svrFactory.setAddress("http://localhost:9000/Hello");
svrFactory.setServiceBean(helloworldImpl);
svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
svrFactory.create();
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class OperationNSTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
sf.setServiceClass(NotificationLogImpl.class);
sf.setAddress("local://NotificationLogImpl");
sf.getServiceFactory().setDataBinding(new AegisDatabinding());
sf.create();
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class OverrideTypeTest method testOverrideBean.
@Test
public void testOverrideBean() throws Exception {
AegisDatabinding aegisDatabinding = new AegisDatabinding();
Set<String> types = new HashSet<>();
types.add("org.apache.cxf.aegis.inheritance.Employee");
aegisDatabinding.setOverrideTypes(types);
DataReader<XMLStreamReader> dataReader = aegisDatabinding.createReader(XMLStreamReader.class);
InputStream employeeBytes = testUtilities.getResourceAsStream("/org/apache/cxf/aegis/override/employee.xml");
XMLInputFactory readerFactory = XMLInputFactory.newInstance();
XMLStreamReader reader = readerFactory.createXMLStreamReader(employeeBytes);
Object objectRead = dataReader.read(reader);
assertNotNull(objectRead);
assertTrue(objectRead instanceof Employee);
Employee e = (Employee) objectRead;
assertEquals("long", e.getDivision());
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class FlatArrayTest method testDataMovementBean.
@Test
public void testDataMovementBean() throws Exception {
ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
proxyFac.setDataBinding(new AegisDatabinding());
proxyFac.setAddress("local://FlatArray");
proxyFac.setBus(getBus());
FlatArrayServiceInterface client = proxyFac.create(FlatArrayServiceInterface.class);
BeanWithFlatArray bwfa = new BeanWithFlatArray();
bwfa.setValues(INT_ARRAY);
client.takeBeanWithFlatArray(bwfa);
assertArrayEquals(INT_ARRAY, service.beanWithFlatArrayValue.getValues());
}
Aggregations