5 Replies Latest reply on Aug 14, 2008 3:39 AM by Shashank Jain

    WS Eventing client - basics question

    moensie Newbie

      Hello,

      I am currently trying to write a ws-eventing client application. It is a swing application that should be notified of updates that occur on my server (is this possible??).

      I followed the SysmonTestCase example and I am able to subscribe to events. I am wondering now how can I read the events????

      I mean, ok, I subscribed to something. But I have to supply an endpoint when subscribing! What should this address be? And how do I receive events there????

      Thanx
      Manu

        • 1. Re: WS Eventing client - basics question
          Heiko Braun Master

          Eventing uses the remoting subsystem to send notifications. It should be possible to to trigger a, let's socket invocation by passing an according remoting URL within the EPR. In order to consume this on the client side, your swing app would need set up a corresponding server socket.

          See http://labs.jboss.com/portal/jbossremoting/docs/guide/

          • 2. Re: WS Eventing client - basics question
            moensie Newbie

            Aha, I should use remoting.

            Funny actually. I already got started on a pure JBoss remoting solution. I threw out the webservice eventing and added a register/ deregister method to my existing webservice (a plain synchronous one). In the register method I add the address to a list and whenever an event is thrown I use the JBoss remoting to send messages to a JBoss remoting webserver that I started on my client side (Java Swings app).

            Looks like the solution was closer than I thought.

            Maybe I'll give it another try now I know that I should have used remoting. Changes to my application seem minimal enough.

            • 3. Re: WS Eventing client - basics question
              Heiko Braun Master

              Yes, tell us what you have come up with when it's working...

              • 4. Re: WS Eventing client - basics question
                Shashank Jain Newbie

                Hi Manu,
                I am trying to setup WS-Eventing on JBoss WS 2.0.3
                Can you please let me know of the steps..I am not able to do it from what is mentioned on wiki
                Regards
                Shashank

                • 5. Re: WS Eventing client - basics question
                  Shashank Jain Newbie

                  I am able to deploy the WS-Eventing samples but when I run the Sysmon sample test case I am getting errors in logs.

                  Testsuite: org.jboss.test.ws.jaxws.samples.wseventing.SysmonTestCase
                  Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 7.029 sec

                  Testcase: testSubscribe took 1.609 sec
                  Caused an ERROR
                  javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
                  at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
                  at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
                  at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.(ServiceDelegateImpl.java:133)
                  at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
                  at javax.xml.ws.Service.(Service.java:82)
                  at javax.xml.ws.Service.create(Service.java:334)
                  at org.jboss.test.ws.jaxws.samples.wseventing.SysmonTestCase.setUp(SysmonTestCase.java:88)
                  at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
                  at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
                  at junit.extensions.TestSetup.run(TestSetup.java:23)
                  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:394)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:178)
                  at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
                  Caused by: 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:382)
                  at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
                  at sun.net.www.http.HttpClient.(HttpClient.java:231)
                  at sun.net.www.http.HttpClient.New(HttpClient.java:304)
                  at sun.net.www.http.HttpClient.New(HttpClient.java:316)
                  at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
                  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
                  at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
                  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
                  at java.net.URL.openStream(URL.java:1007)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.handleSchemaImports(WSDL11Reader.java:588)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processSchemaInclude(WSDL11Reader.java:560)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processSchemaInclude(WSDL11Reader.java:529)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:385)

                  Testcase: testUnsubscribe took 1.109 sec
                  Caused an ERROR
                  javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
                  at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
                  at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
                  at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.(ServiceDelegateImpl.java:133)
                  at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
                  at javax.xml.ws.Service.(Service.java:82)
                  at javax.xml.ws.Service.create(Service.java:334)
                  at org.jboss.test.ws.jaxws.samples.wseventing.SysmonTestCase.setUp(SysmonTestCase.java:88)
                  at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
                  at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
                  at junit.extensions.TestSetup.run(TestSetup.java:23)
                  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:394)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:178)
                  at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
                  Caused by: 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:382)
                  at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
                  at sun.net.www.http.HttpClient.(HttpClient.java:231)
                  at sun.net.www.http.HttpClient.New(HttpClient.java:304)
                  at sun.net.www.http.HttpClient.New(HttpClient.java:316)
                  at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
                  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
                  at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
                  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
                  at java.net.URL.openStream(URL.java:1007)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.handleSchemaImports(WSDL11Reader.java:588)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processSchemaInclude(WSDL11Reader.java:560)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processSchemaInclude(WSDL11Reader.java:529)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:385)

                  Testcase: testNotification took 1.093 sec
                  Caused an ERROR
                  javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
                  at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
                  at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
                  at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.(ServiceDelegateImpl.java:133)
                  at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
                  at javax.xml.ws.Service.(Service.java:82)
                  at javax.xml.ws.Service.create(Service.java:334)
                  at org.jboss.test.ws.jaxws.samples.wseventing.SysmonTestCase.setUp(SysmonTestCase.java:88)
                  at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
                  at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
                  at junit.extensions.TestSetup.run(TestSetup.java:23)
                  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection refused: connect
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:394)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:178)
                  at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
                  Caused by: 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:382)
                  at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
                  at sun.net.www.http.HttpClient.(HttpClient.java:231)
                  at sun.net.www.http.HttpClient.New(HttpClient.java:304)
                  at sun.net.www.http.HttpClient.New(HttpClient.java:316)
                  at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
                  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
                  at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
                  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
                  at java.net.URL.openStream(URL.java:1007)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.handleSchemaImports(WSDL11Reader.java:588)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processSchemaInclude(WSDL11Reader.java:560)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processSchemaInclude(WSDL11Reader.java:529)
                  at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:385)



                  Dont really know whats happening...What I also observed is that all web services wsdl dont have a service element . Pleas help me on this..

                  Regards
                  Shashank