SOAPServerBinding serverBinding = new SOAPServerBinding(bus, epr, null);
assertNotNull(serverBinding.getBinding());
}
public void testProviderDispatchMessageModeSourceData() throws Exception {
HelloWorldServiceProvider provider = new HelloWorldServiceProvider();
TestEndpointImpl testEndpoint
= new TestEndpointImpl(
provider,
DataBindingCallback.Mode.MESSAGE,
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);
}