Hello, how can I virtualize the following function within Devtest through TCP or what method do you recommend the service to virtualize is a socket.
socket = new Socket (host, Integer.parseInt (port));
socket.setSoTimeout (Integer.parseInt (timeOut));
//System.out.println("connecting .. ");
logger.info ("ConnectToCDCSocket.getReportCDC () >> connecting ..");
input = new DataInputStream (socket.getInputStream ());
output = new DataOutputStream (socket.getOutputStream ());
exit.writeBytes (XMLSRequest);
exit.flush ();
// Long end = System.currentTimeMillis ();
/ * Change for optimization when getting an answer - Migracion 10/08/2012 * /
StringBuilder sBuilder = new StringBuilder ();
while ((answer = input.readLine ())! = null) {
// end answer = answer;
sBuilder.append (answer);
}
Final answer = sBuilder.toString ();
would help me a lot if you have an example of how a socket is virtualized in devtest
Thanks