new ByteArrayInputStream(received.getData()));
ReplyMessage reply = (ReplyMessage) SLPMessage.parse(received
.getAddress(), received.getPort(), in, false);
return reply;
} catch (SocketException se) {
throw new ServiceLocationException(
ServiceLocationException.NETWORK_INIT_FAILED, se
.getMessage());
} catch (ProtocolException pe) {
// Overflow, retry with TCP
return sendMessageTCP(msg);
} catch (IOException ioe) {
platform.logError("Exception during sending of " + msg);
platform.logError("to " + msg.address + ":" + msg.port);
platform.logError("Exception:", ioe);
throw new ServiceLocationException(
ServiceLocationException.NETWORK_ERROR, ioe.getMessage());
} catch (Throwable t) {
platform.logDebug(t.getMessage(), t);
throw new ServiceLocationException((short) 1, t.getMessage());
}
}