}
private IReceivable<String> doSendAndReceiveInternal(ISendable theMessageToSend, Socket socket) throws IOException, DecodeException, SignatureVerificationException, EncodeException {
Hl7OverHttpRequestEncoder enc = new Hl7OverHttpRequestEncoder();
enc.setUri(myUri);
enc.setHost(myHost);
enc.setPort(myPort);
enc.setCharset(myCharset);
if (myAuthorizationCallback != null) {
enc.setUsername(myAuthorizationCallback.provideUsername(myUri));
enc.setPassword(myAuthorizationCallback.providePassword(myUri));
}
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;