myInputStream = new BufferedInputStream(socket.getInputStream());
return socket;
}
private IReceivable<String> doSendAndReceiveInternal(ISendable<?> theMessageToSend, Socket socket) throws IOException, DecodeException, SignatureVerificationException, EncodeException {
Hl7OverHttpRequestEncoder enc = new Hl7OverHttpRequestEncoder();
enc.setPath(myPath);
enc.setHost(myHost);
enc.setPort(myPort);
enc.setCharset(myCharset);
if (myAuthorizationCallback != null) {
enc.setUsername(myAuthorizationCallback.provideUsername(myPath));
enc.setPassword(myAuthorizationCallback.providePassword(myPath));
}
enc.setSigner(mySigner);
enc.setDataProvider(theMessageToSend);
ourLog.debug("Writing message to OutputStream");
enc.encodeToOutputStream(myOutputStream);
myOutputStream.flush();
ourLog.debug("Reading response from OutputStream");
RawReceivable response = null;