this.data = data;
this.length = length;
}
public void run() {
MetricsCollector metrics = endpoint.getMetrics();
try {
InputStream inputStream = new ByteArrayInputStream(data, 0, length);
MessageContext msgContext = endpoint.getListener().createMessageContext();
msgContext.setAxisService(endpoint.getService());
SOAPEnvelope envelope = TransportUtils.createSOAPMessage(msgContext, inputStream, endpoint.getContentType());
msgContext.setEnvelope(envelope);
AxisEngine.receive(msgContext);
metrics.incrementMessagesReceived();
metrics.incrementBytesReceived(length);
} catch (Exception ex) {
metrics.incrementFaultsReceiving();
StringBuilder buffer = new StringBuilder("Error during processing of UDP packet:\n");
Utils.hexDump(buffer, data, length);
log.error(buffer.toString(), ex);
}
}