m_outInterceptor = new CopiedOutputStreamInterceptor(m_requestBaos);
m_inInterceptor = new CopiedInputStreamInterceptor(m_responseBaos);
}
private Welcome sayHello(Greetee s) throws WsException, IOException {
SoapClient client = new SoapClient(m_location, m_fact);
TransportOptions transportOptions = TransportDirectory.newTransportOptions(m_location);
if (transportOptions instanceof OutputStreamInterceptable) {
((OutputStreamInterceptable)transportOptions).setOutputStreamInterceptor(m_outInterceptor);
}
if (transportOptions instanceof InputStreamInterceptable) {
((InputStreamInterceptable)transportOptions).setInputStreamInterceptor(m_inInterceptor);
}
client.setTransportOptions(transportOptions);
Welcome welcome = (Welcome) client.call(s);
System.out.println("Request is " + m_requestBaos.toString());
System.out.println("Response is " + m_responseBaos.toString());
return welcome;
}