public class EndpointParser {
public String parseServiceName(String endpoint) throws NoValidEndpointException {
String[] splitted=endpoint.split(":");
if (splitted.length<1) {
throw new NoValidEndpointException("no method found");
}
return splitted[0];
}