newday
newday

Reputation: 3878

org.springframework.ws.soap.client.SoapFaultClientException: Server was unable to process request. ---> Timeout expired

I'm trying to get working the SOAP web consumer example given in spring doc spring doc

However, I keep getting the following when I try to run the Applicaiton class as Spring Boot App.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.1.RELEASE)

2016-10-14 10:58:08.193  INFO 4496 --- [           main] hello.Application                        : Starting Application on bumblebee with PID 4496 (C:\Users\menuka\workspace\monkey-api-netbeans\gs-consuming-web-service-complete\target\classes started by menuka in C:\Users\menuka\workspace\monkey-api-netbeans\gs-consuming-web-service-complete)
2016-10-14 10:58:08.196  INFO 4496 --- [           main] hello.Application                        : No active profile set, falling back to default profiles: default
2016-10-14 10:58:08.244  INFO 4496 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@37918c79: startup date [Fri Oct 14 10:58:08 PDT 2016]; root of context hierarchy
2016-10-14 10:58:08.808  INFO 4496 --- [           main] o.s.oxm.jaxb.Jaxb2Marshaller             : Creating JAXBContext with context path [hello.wsdl]
2016-10-14 10:58:08.900  INFO 4496 --- [           main] o.s.ws.soap.saaj.SaajSoapMessageFactory  : Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
2016-10-14 10:58:08.902 DEBUG 4496 --- [           main] o.s.ws.soap.saaj.SaajSoapMessageFactory  : Using MessageFactory class [com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl]
2016-10-14 10:58:09.067  INFO 4496 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-10-14 10:58:09.076  INFO 4496 --- [           main] hello.WeatherClient                      : Requesting forecast for 94304
2016-10-14 10:58:09.083 DEBUG 4496 --- [           main] o.s.ws.client.core.WebServiceTemplate    : Opening [org.springframework.ws.transport.http.HttpUrlConnection@2fc6f97f] to [http://wsf.cdyne.com/WeatherWS/Weather.asmx]
2016-10-14 10:58:09.155 DEBUG 4496 --- [           main] o.s.ws.client.MessageTracing.sent        : Sent request [SaajSoapMessage {http://ws.cdyne.com/WeatherWS/}GetCityForecastByZIP]
2016-10-14 10:58:21.633 DEBUG 4496 --- [           main] o.s.ws.client.MessageTracing.received    : Received response [SaajSoapMessage {http://schemas.xmlsoap.org/soap/envelope/}Fault] for request [SaajSoapMessage {http://ws.cdyne.com/WeatherWS/}GetCityForecastByZIP]
2016-10-14 10:58:21.633 DEBUG 4496 --- [           main] o.s.ws.client.core.WebServiceTemplate    : Received Fault message for request [SaajSoapMessage {http://ws.cdyne.com/WeatherWS/}GetCityForecastByZIP]
2016-10-14 10:58:21.637  INFO 4496 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2016-10-14 10:58:21.643 ERROR 4496 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.IllegalStateException: Failed to execute CommandLineRunner
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:803) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    at hello.Application.main(Application.java:15) [classes/:na]
Caused by: org.springframework.ws.soap.client.SoapFaultClientException: Server was unable to process request. ---> Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
    at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:38) ~[spring-ws-core-2.3.0.RELEASE.jar:2.3.0.RELEASE]
    at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:830) ~[spring-ws-core-2.3.0.RELEASE.jar:2.3.0.RELEASE]
    at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:624) ~[spring-ws-core-2.3.0.RELEASE.jar:2.3.0.RELEASE]
    at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555) ~[spring-ws-core-2.3.0.RELEASE.jar:2.3.0.RELEASE]
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:390) ~[spring-ws-core-2.3.0.RELEASE.jar:2.3.0.RELEASE]
    at hello.WeatherClient.getCityForecastByZip(WeatherClient.java:29) ~[classes/:na]
    at hello.Application.lambda$lookup$0(Application.java:26) [classes/:na]
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    ... 6 common frames omitted

2016-10-14 10:58:21.644  INFO 4496 --- [           main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@37918c79: startup date [Fri Oct 14 10:58:08 PDT 2016]; root of context hierarchy
2016-10-14 10:58:21.646  INFO 4496 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

What is going on here? Can anybody advise here me?

Upvotes: 1

Views: 5380

Answers (1)

Javide
Javide

Reputation: 2637

This SOAP action is not available at the moment. You can try it yourself on a browser: http://wsf.cdyne.com/WeatherWS/Weather.asmx?op=GetCityForecastByZIP

If you enter 94304 and hit "Invoke" you get error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Upvotes: 1

Related Questions