Search in sources :

Example 1 with MAPAggregatorImpl

use of org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl in project cxf by apache.

the class NestedAddressingPolicyTest method greetMeWSA.

@Test
public void greetMeWSA() throws Exception {
    // use a wsa-enabled client
    SpringBusFactory bf = new SpringBusFactory();
    bus = bf.createBus();
    BusFactory.setDefaultBus(bus);
    BasicGreeterService gs = new BasicGreeterService();
    final Greeter greeter = gs.getGreeterPort();
    updateAddressPort(greeter, PORT);
    LoggingInInterceptor in = new LoggingInInterceptor();
    LoggingOutInterceptor out = new LoggingOutInterceptor();
    MAPCodec mapCodec = MAPCodec.getInstance(bus);
    MAPAggregatorImpl mapAggregator = new MAPAggregatorImpl();
    bus.getInInterceptors().add(in);
    bus.getInInterceptors().add(mapCodec);
    bus.getInInterceptors().add(mapAggregator);
    bus.getOutInterceptors().add(out);
    bus.getOutInterceptors().add(mapCodec);
    bus.getOutInterceptors().add(mapAggregator);
    String s = greeter.greetMe("mytest");
    assertEquals("MYTEST", s);
    ((Closeable) greeter).close();
}
Also used : MAPAggregatorImpl(org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl) SpringBusFactory(org.apache.cxf.bus.spring.SpringBusFactory) LoggingOutInterceptor(org.apache.cxf.ext.logging.LoggingOutInterceptor) Greeter(org.apache.cxf.greeter_control.Greeter) Closeable(java.io.Closeable) LoggingInInterceptor(org.apache.cxf.ext.logging.LoggingInInterceptor) BasicGreeterService(org.apache.cxf.greeter_control.BasicGreeterService) MAPCodec(org.apache.cxf.ws.addressing.soap.MAPCodec) Test(org.junit.Test)

Aggregations

Closeable (java.io.Closeable)1 SpringBusFactory (org.apache.cxf.bus.spring.SpringBusFactory)1 LoggingInInterceptor (org.apache.cxf.ext.logging.LoggingInInterceptor)1 LoggingOutInterceptor (org.apache.cxf.ext.logging.LoggingOutInterceptor)1 BasicGreeterService (org.apache.cxf.greeter_control.BasicGreeterService)1 Greeter (org.apache.cxf.greeter_control.Greeter)1 MAPAggregatorImpl (org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl)1 MAPCodec (org.apache.cxf.ws.addressing.soap.MAPCodec)1 Test (org.junit.Test)1