Код: Выделить всё
org.springframework.http.InvalidMediaTypeException: Invalid mime type "text/xml; subtype=gml/3.1.1;charset=UTF-8": Invalid token character '/' in token "gml/3.1.1"Действительная сервисная ссылка выглядит следующим образом:
https://www.luis.sachsen.de/arcgis/serv ... sserverver ? 0059 5651815.157329135,413721.3886195286 56663092.940723425, урн : ogc: def: crs: epsg :: 25833 < /p>
Это то, как выглядит метод: < /p>
Код: Выделить всё
private static final WebClient webClient = WebClient.create();
public static String fetchRemoteText(String url) {
try {
return webClient.get().uri(url).retrieve().bodyToMono(String.class).doOnSuccess(body -> {
if (body == null || body.isBlank()) {
log.info("Empty result returned.");
}
}).block();
} catch (Exception e) {
log.error("Error fetching from URL {}: {}", url, e.getMessage(), e);
return null;
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... -webclient