Hi! Aus irgendeinem grund blockiert der Server beim einlesen des inputstreams sobald ich auf dem client auf den socket inputstream zugreife.
Client:
Code
Socket socket = new Socket(server, port);
OutputStream out = socket.getOutputStream();
Document xmlDoc = Marshaller.getInstance().marshall(className, methodName, returnType, params);
Source src = new DOMSource(xmlDoc);
Result dest = new StreamResult(out);
aTransformer.transform(src, dest);
out.flush();
PrintWriter pwriter = new PrintWriter(out,true);
/* wenn ich den DataInputStream tkiviere blockiert der Server
DataInputStream in = new DataInputStream(socket.getInputStream());
BufferedReader bin = new BufferedReader( new InputStreamReader(in));
readInput(in);
String fromServer;
while ((fromServer = bin.readLine()) != null) {
System.out.println(fromServer);
}
*/
out.close();
pwriter.close();
//in.close();
socket.close();
Alles anzeigen
Server:
Code
in = socket.getInputStream();
readInput();
handleRequest();
PrintStream os = new PrintStream(socket.getOutputStream());
Document xmlDoc = at.evs.server.Marshaller.getInstance().marshall(returnType, result);
Source src = new DOMSource(xmlDoc);
Result dest = new StreamResult(os);
TransformerFactory tranFactory = TransformerFactory.newInstance();
Transformer aTransformer = tranFactory.newTransformer();
aTransformer.transform(src, dest);
os.flush();
os.close();
socket.close();
Alles anzeigen
jemand eine idee parat?