OutputStream os = serverTransport.getOutputStreamContext().getOutputStream();
assertNotNull(os);
}
public void testProviderDispatchPayloadModeSourceData() throws Exception {
HWSourcePayloadProvider provider = new HWSourcePayloadProvider();
TestEndpointImpl testEndpoint = new TestEndpointImpl(
provider,
DataBindingCallback.Mode.PAYLOAD,
DOMSource.class,
new QName[]{
new QName("http://objectweb.org/hello_world_soap_http/types",
"sayHi")
});
TestServerBinding serverBinding = new TestServerBinding(bus, epr, testEndpoint, testEndpoint);
TestServerTransport serverTransport = new TestServerTransport(bus, epr);
TestInputStreamContext inCtx = new TestInputStreamContext(null);
InputStream is = getClass().getResourceAsStream("resources/sayHiDocLiteralReq.xml");
inCtx.setInputStream(is);
serverBinding.testDispatch(inCtx, serverTransport);
assertEquals(1, provider.getInvokeCount());
assertNotNull(serverTransport.getOutputStreamContext());
assertFalse(serverTransport.getOutputStreamContext().isFault());
OutputStream os = serverTransport.getOutputStreamContext().getOutputStream();
assertNotNull(os);
}