Spring RestTemplate Client -исключение отказа в соединении

Я новичок в веб-сервисах и пытаюсь написать клиент веб-сервиса RESTFul с помощью RestTemplate. Я использую org.springframework.http.converter.xml.MarshallingHttpMessageConverter в качестве преобразователя сообщений и org.springframework.oxm.xstream.XStreamMarshaller в качестве маршаллера.

Есть ли способ отладить это дальше или выяснить основную причину этой проблемы?

Мой потребительский класс выглядит так-

@SuppressWarnings("unchecked")
public List<Deal> getClientInformation() throws RestClientException {
    return restTemplate.getForObject(webServiceURL, List.class);

}

Исключение:

Exception in thread "main" org.springframework.web.client.ResourceAccessException: I/O error: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:359)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:307)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:177)
at main.java.com.sample.consumer.DealConsumer.getClientInformation(Consumer.java:35)
at main.java.com.client.WebserviceConsumerTestClient.main(WebserviceConsumerTestClient.java:16)

Вызвано :java.net.ConnectException :В соединении отказано :соединение в org.springframework.web.client.RestTemplate.doExecute (RestTemplate.java :359)

11
задан PST 25 July 2012 в 11:28
поделиться