Announcement Announcement Module
Collapse
No announcement yet.
Connection refused: connect, any help!! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connection refused: connect, any help!!

    Hi everybody, I have a big problem with this error :
    Code:
    Exception in thread "main" org.springframework.ws.client.WebServiceIOException: I/O error: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
    java.net.ConnectException: Connection refused: connect
    	at java.net.PlainSocketImpl.socketConnect(Native Method)
    	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    	at java.net.Socket.connect(Socket.java:519)
    	at java.net.Socket.connect(Socket.java:469)
    	at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
    	at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
    	at sun.net.www.http.HttpClient.openServer(HttpClient.java:500)
    	at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
    	at sun.net.www.http.HttpClient.New(HttpClient.java:306)
    	at sun.net.www.http.HttpClient.New(HttpClient.java:318)
    	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
    	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:733)
    	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:658)
    	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
    	at org.springframework.ws.transport.http.HttpUrlConnection.getRequestOutputStream(HttpUrlConnection.java:71)
    	at org.springframework.ws.transport.AbstractSenderConnection$RequestTransportOutputStream.createOutputStream(AbstractSenderConnection.java:93)
    	at org.springframework.ws.transport.TransportOutputStream.getOutputStream(TransportOutputStream.java:41)
    	at org.springframework.ws.transport.TransportOutputStream.close(TransportOutputStream.java:48)
    	at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:40)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:547)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:405)
    	at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:264)
    	at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:252)
    	at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:244)
    	at client.SolicitudVacacionesServiceGateway.evaluateVacaciones(SolicitudVacacionesServiceGateway.java:33)
    	at client.AirlineClient.main(AirlineClient.java:80)
    I am running application in the same computer and port is 8080. I checked "locationUri" property of "DynamicWsdl11Definition" and "defaultUri" property of superclass SolicitudVacacionesServiceGateway extends WebServiceGatewaySupport


    Code:
    <bean id="holiday"
    		class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
    		<property name="builder">
    			<bean
    				class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
    				<property name="schema" value="/WEB-INF/hr.xsd" />
    				<property name="portTypeName" value="HumanResource" />
    				<property name="locationUri"
    					value="http://localhost:8080/EjemploSimpleSpring/service" />
    				<!-- <property name="targetNamespace"
    					value="http://mycompany.com/hr/definitions" /> -->
    			</bean>
    		</property>
    	</bean>
    
    and the other xml 
    
    <bean id="SolcitudVacacionesClientGateway"
    		class="client.SolicitudVacacionesServiceGateway">
    		<property name="messageFactory">
    			<bean
    				class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory" />
    		</property>
    		<property name="messageSenders" ref="messageSender" />
    		<property name="marshaller" ref="marshaller" />
    		<property name="unmarshaller" ref="marshaller" />
    		
    		<property name="defaultUri"
    			value="http://localhost:8080/EjemploSimpleSpring/service">
    		</property>
    	</bean>
    Anybody would tell me how i resolve this problem, because i have a lot time with it.
    Thanks

  • #2
    I too have this same issue.
    Does anyone know what is problem? (including you are missing this obvious item).
    My firewall is off (corporate PC - firewall is network device).
    not using default port but same issues.

    Comment


    • #3
      Well, it's quite simple, really: the service you're trying to connect to is not running at the specified address. That's why it can't connect.

      You can try telnetting into the same location (or use your browser), and it will tell you the same thing.

      Comment


      • #4
        It was a config issue that the WSDL was correctly published but the service was not. I think it was due to confusion that was somewhat resolved. I am still not convinced I am doing as well as I could, but it is working.

        BTW, thank you Spring contributors for creating such a easily configured framework. It helps when my lack of knowledge caused me to go down 'bad' roads.

        Comment


        • #5
          It was a config issue that the WSDL was correctly published but the service was not.
          Could you please answer what was the issue?

          Thank you

          Comment


          • #6
            Solved for me.

            I used wrong port in my ws url. Check server config just in case, maybe it is your issue too

            Comment

            Working...
            X