5 Replies Latest reply on May 21, 2008 4:47 AM by tfennelly

    webservice_producer quickstart fails with CannotConnectExcep

    jimpo991

      I am using jbossesb-4.2.1GA on jboss-4.2.1GA. I have installed jbossws-native.2.0.0GA and run the ant patch-jbossws. All components are out-of-the-box with no special configurations done.

      ant deploy works fine but ant runtest fails:

      dependencies:
      
      compile:
      
      saygoodbye_over_jms:
       [echo] Invoking a JBossWS Endpoint over JMS (via JBoss ESB).
      
      check-jbossesb-dist:
      
      qslib-dependencies:
      
      non-qslib-dependencies:
      
      jbossesb-dependencies:
      
      jbossesb-server-dependencies:
      
      messaging-config:
      
      messaging-dependencies:
      
      jbossmq-dependencies:
      
      assert-ws-available:
       [echo] JBoss Webservice container found on target 'D:/tre-soa-poc/sandbox/8-esb/jboss-4.2.1.GA/server/default/deploy'.
      
      quickstart-specific-dependencies:
      
      dependencies:
      
      compile:
      
      saygoodbye_over_http:
       [echo] Invoking a JBossWS Endpoint over HTTP (via JBoss ESB).
       [java] Calling JBoss Remoting Listener using locator URI: http://localhost:8765
       [java] Exception in thread "main" org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
       [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:332)
       [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
       [java] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       [java] at org.jboss.remoting.Client.invoke(Client.java:1550)
       [java] at org.jboss.remoting.Client.invoke(Client.java:530)
       [java] at org.jboss.remoting.Client.invoke(Client.java:518)
       [java] at org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage.sendMessageToJBRListener(SendMessage.java:72)
       [java] at org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage.main(SendMessage.java:114)
       [java] Caused by: java.io.StreamCorruptedException: invalid stream header
       [java] at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
       [java] at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
       [java] at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:95)
       [java] at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
       [java] at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:72)
       [java] at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:119)
       [java] at org.jboss.remoting.marshal.http.HTTPUnMarshaller.read(HTTPUnMarshaller.java:69)
       [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:470)
       [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:304)
       [java] ... 7 more
      
      BUILD FAILED


        • 1. Re: webservice_producer quickstart fails with CannotConnectE
          jimpo991

          When this happens, my JBossAS log looks pretty normal to me:

          16:13:19,656 INFO [STDOUT] [Quickstart_webservice_producer] BEFORE invoking jbossws endpoint:
          16:13:19,656 INFO [STDOUT] [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworl
          d">
           <soapenv:Header/>
           <soapenv:Body>
           <good:sayGoodbye>
           <message>Goodbye!!</message>
           </good:sayGoodbye>
           </soapenv:Body>
          </soapenv:Envelope>].
          16:13:19,656 INFO [STDOUT] **** SOAPRequest perhaps mediated by ESB:
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">
           <soapenv:Header/>
           <soapenv:Body>
           <good:sayGoodbye>
           <message>Goodbye!!</message>
           </good:sayGoodbye>
           </soapenv:Body>
          </soapenv:Envelope>
          16:13:19,656 INFO [STDOUT] Web Service Parameter - message=Goodbye!!
          16:13:19,656 INFO [STDOUT] [Quickstart_webservice_producer] AFTER invoking jbossws endpoint:
          16:13:19,656 INFO [STDOUT] [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns2:sayGoodbyeResponse
           xmlns:ns2="http://webservice_producer/goodbyeworld"><return>... Ah Goodbye then!!!! - Goodbye!!</return></ns2:sayGoodbyeResponse></env:Body></env:Envelope
          >].
          16:13:19,656 WARN [ActionProcessingPipeline] No reply to address defined for reply message! To: JMSEpr [ PortReference < <wsa:Address jms://localhost/queu
          e/quickstart_webservice_producer_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:Ref
          erenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jb
          ossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persist
          ent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/> > ] MessageID: ID:4-12112891996259 RelatesTo: jms:correlationID#ID:7-12112891996091
          16:13:21,812 INFO [STDOUT] [Quickstart_webservice_producer] BEFORE invoking jbossws endpoint:
          16:13:21,812 INFO [STDOUT] [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworl
          d">
           <soapenv:Header/>
           <soapenv:Body>
           <good:sayGoodbye>
           <message>Goodbye!!</message>
           </good:sayGoodbye>
           </soapenv:Body>
          </soapenv:Envelope>].
          16:13:21,812 INFO [STDOUT] **** SOAPRequest perhaps mediated by ESB:
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">
           <soapenv:Header/>
           <soapenv:Body>
           <good:sayGoodbye>
           <message>Goodbye!!</message>
           </good:sayGoodbye>
           </soapenv:Body>
          </soapenv:Envelope>
          16:13:21,812 INFO [STDOUT] Web Service Parameter - message=Goodbye!!
          16:13:21,812 INFO [STDOUT] [Quickstart_webservice_producer] AFTER invoking jbossws endpoint:
          16:13:21,812 INFO [STDOUT] [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns2:sayGoodbyeResponse
           xmlns:ns2="http://webservice_producer/goodbyeworld"><return>... Ah Goodbye then!!!! - Goodbye!!</return></ns2:sayGoodbyeResponse></env:Body></env:Envelope
          >].
          


          Also I can test the WS interfaces at http://127.0.0.1:8080/Quickstart_webservice_producer/GoodbyeWorldWS?wsdl using for example soapUI and they seem to be working fine as far as I can tell.

          What's the error message about, and is my jbossesb fully functional for creating web services?

          • 2. Re: webservice_producer quickstart fails with CannotConnectE
            tfennelly

            I'm fairly sure this is the version of JBossRemoting you're using in the AS. I'm trying to find which version you should be using and will post back.

            • 3. Re: webservice_producer quickstart fails with CannotConnectE
              tfennelly

              Looks like it should be JBR 2.2.2.SP2. If you're working from the distro, this is the version that should be in the lib/ext folder (jboss-remoting.jar). Try copying it from there into your AS (jboss-4.2.1.GA/client and jboss-4.2.1.GA/server/default/lib).

              • 4. Re: webservice_producer quickstart fails with CannotConnectE
                jimpo991

                This fixed the problem, thanks a lot!

                Since the web services seem to be working fine even with the old jboss-remoting, what problems would running the old JBR cause?

                If my client is running a JBossAS installation and has not updated JBR, is jbossesb installation fully functional?

                • 5. Re: webservice_producer quickstart fails with CannotConnectE
                  tfennelly

                  It matters because the test using JBR Client to perform the invocation on a JBR Server.

                  JBR client adds some headers that are picked up by the JBR Server. The Server tries to perform some optimizations (I forget because it's a long time ago since I looked at it) that obviously get screwed when the client and server JBR versions are not compatible. IMO, it's a bug in JBR... the client should add its version info in the request (if it's not already doing it) and the optimizations should only happen when the client and server versions are in sync or compatible.