private EndpointDataType createEndpointData(
Endpoint eprProvider,
long lastTimeStarted,
long lastTimeStopped) throws ServiceLocatorException {
EndpointDataType endpointData = ENDPOINT_OBJECT_FACTORY.createEndpointDataType();
endpointData.setBinding(
BindingType.fromValue(eprProvider.getBinding().getValue()));
endpointData.setTransport(
TransportType.fromValue(eprProvider.getTransport().getValue()));
endpointData.setLastTimeStarted(lastTimeStarted);
endpointData.setLastTimeStopped(lastTimeStopped);
DOMResult result = new DOMResult();
eprProvider.writeEndpointReferenceTo(result, this);
Document doc = (Document) result.getNode();
endpointData.setEndpointReference(doc.getDocumentElement());
return endpointData;
}