use of org.pentaho.test.platform.plugin.services.webservices.StubTransportSender in project pentaho-platform by pentaho.
the class AxisServiceExecutorTest method setUp.
@Before
public void setUp() throws Exception {
StandaloneSession session = new StandaloneSession("test");
StubServiceSetup serviceSetup = new StubServiceSetup();
serviceSetup.setSession(session);
AxisConfiguration axisCfg = serviceSetup.getAxisConfiguration();
ConfigurationContext configContext = new ConfigurationContext(axisCfg);
serviceSetup.loadServices();
TransportInDescription tIn = new TransportInDescription(DEAFULT_TRANSPOT_PROTOCOL);
StubTransportListener receiver = new StubTransportListener();
tIn.setReceiver(receiver);
axisCfg.addTransportIn(tIn);
TransportOutDescription tOut = new TransportOutDescription(DEAFULT_TRANSPOT_PROTOCOL);
StubTransportSender sender = new StubTransportSender();
tOut.setSender(sender);
axisCfg.addTransportOut(tOut);
AxisWebServiceManager.currentAxisConfiguration = axisCfg;
AxisWebServiceManager.currentAxisConfigContext = configContext;
out = new ByteArrayOutputStream();
IOutputHandler outputHandler = new SimpleOutputHandler(out, false);
outputHandler.setMimeTypeListener(new MimeTypeListener());
contentGenerator = new AxisServiceExecutor();
contentGenerator.setOutputHandler(outputHandler);
contentGenerator.setMessagesList(new ArrayList<String>());
contentGenerator.setSession(session);
contentGenerator.setUrlFactory(new SimpleUrlFactory(BASE_URL + "?"));
assertNotNull("contentGenerator is null", contentGenerator);
assertNotNull("Logger is null", contentGenerator.getLogger());
}
Aggregations