6 Replies Latest reply on Sep 11, 2007 11:56 AM by adinn

    XTS Demo and JBossWS 2.0

    macktheknife73

      Hi ...
      I'm trying to get the demo work and I'm getting an exception, I running JBoss 4.2.1 with JBossWS 2.0 ... I'm getting the following, have I done something wrong ? or should I revert to JBoss 1.x

      20:14:31,926 INFO [STDOUT] CLIENT: obtaining userTransaction...
      20:14:31,926 INFO [STDOUT] CLIENT: starting the transaction...
      20:14:32,583 ERROR [[HTTP SOAP Service Multiplexor Servlet]] Servlet.service() for servlet HTTP SOAP Service Multiplexor Servlet threw exception
      java.io.IOException: javax.xml.stream.XMLStreamException: [com.arjuna.webservices.wsaddr.AddressingContext_1] - Addressing context is not valid
      at com.arjuna.webservices.soap.SoapMessageBase.output(SoapMessageBase.java:87)
      at com.arjuna.webservices.transport.http.HttpServiceMultiplexorServlet.doPost(HttpServiceMultiplexorServlet.java:177)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
      20:14:32,598 INFO [STDOUT] CLIENT: problem:
      20:14:32,598 INFO [STDOUT] com.arjuna.wst.SystemException: VersionMismatch[html]
      20:14:32,598 INFO [STDOUT] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.startTransaction(UserTransactionImple.java:232)
      20:14:32,598 INFO [STDOUT] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:105)
      20:14:32,598 INFO [STDOUT] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:95)
      20:14:32,598 INFO [STDOUT] at com.arjuna.xts.nightout.clients.jboss.BasicClient.testAtomicTransaction(BasicClient.java:275)
      20:14:32,598 INFO [STDOUT] at com.arjuna.xts.nightout.clients.jboss.BasicClient.doGet(BasicClient.java:230)
      20:14:32,598 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      20:14:32,598 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      20:14:32,598 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      20:14:32,598 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      20:14:32,598 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      20:14:32,598 INFO [STDOUT] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      20:14:32,598 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      20:14:32,598 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      20:14:32,598 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      20:14:32,598 INFO [STDOUT] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      20:14:32,598 INFO [STDOUT] at java.lang.Thread.run(Thread.java:619)


        • 1. Re: XTS Demo and JBossWS 2.0
          adinn

          The demo ought to work with the versions you quote so it looks like it is a problem with your config.
          The client trace (below the servlet exception) shows that the call to UserTransactionImple.begin() has requested the activation coordinator service to create a coordination context. The servlet exception shows that the service is throwing a fault when it tries to reply to this request because there is an error in the addressing context. This indicates that the coordinator has been configured with an invalid address for the activation requester service.
          Did you install the demo source into XTS/xts-install/demo using the build.sh script in XTS/demo? Did you edit the jboss.properties file in XTS/xts-install/demo? -- there are several symbols here which need to be substituted with the appropriate values e.g. JBOSS_HOSTNAME --> localhost. Did you then use the build.sh script in XTS/xts-install/demo to build and deploy he demo code ito the app server?

          • 2. Re: XTS Demo and JBossWS 2.0
            macktheknife73

            Thanks for the help !!!

            Yep did all of that ... my jboss.properties looks like this


            localhost
            8080
            xtsdemowebservices

            /Dev/jboss-4.2.1.GA/server/all/deploy/


            <!-- webMethods services
            http://WEBMETHODS_HOSTNAME:WEBMETHODS_PORT/WEBMETHODS_URLSTUB/services/RestaurantServiceAT
            http://WEBMETHODS_HOSTNAME:WEBMETHODS_PORT/WEBMETHODS_URLSTUB/services/RestaurantServiceBA
            http://WEBMETHODS_HOSTNAME:WEBMETHODS_PORT/WEBMETHODS_URLSTUB/services/TaxiServiceAT
            http://WEBMETHODS_HOSTNAME:WEBMETHODS_PORT/WEBMETHODS_URLSTUB/services/TaxiServiceBA
            http://WEBMETHODS_HOSTNAME:WEBMETHODS_PORT/WEBMETHODS_URLSTUB/services/TheatreServiceAT
            http://WEBMETHODS_HOSTNAME:WEBMETHODS_PORT/WEBMETHODS_URLSTUB/services/TheatreServiceBA
            -->

            <!-- WebLogic services
            http://WEBLOGIC_HOSTNAME:WEBLOGIC_PORT/WEBLOGIC_URLSTUB/RestaurantServiceAT
            http://WEBLOGIC_HOSTNAME:WEBLOGIC_PORT/WEBLOGIC_URLSTUB/RestaurantServiceBA
            http://WEBLOGIC_HOSTNAME:WEBLOGIC_PORT/WEBLOGIC_URLSTUB/TaxiServiceAT
            http://WEBLOGIC_HOSTNAME:WEBLOGIC_PORT/WEBLOGIC_URLSTUB/TaxiServiceBA
            http://WEBLOGIC_HOSTNAME:WEBLOGIC_PORT/WEBLOGIC_URLSTUB/TheatreServiceAT
            http://WEBLOGIC_HOSTNAME:WEBLOGIC_PORT/WEBLOGIC_URLSTUB/TheatreServiceBA
            -->

            <!-- JBoss services -->
            http://localhost:8080/xtsdemowebservices/RestaurantServiceAT
            http://localhost:8080/xtsdemowebservices/RestaurantServiceBA
            http://localhost:8080/xtsdemowebservices/TaxiServiceAT
            http://localhost:8080/xtsdemowebservices/TaxiServiceBA
            http://localhost:8080/xtsdemowebservices/TheatreServiceAT
            http://localhost:8080/xtsdemowebservices/TheatreServiceBA



            I am getting warnings about not being able to map interfaces to SEI's when I deploy the ear but since I'm not even getting as far as calling them I don't think thats a problem (yet)


            12:14:38,362 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Restaurant.IRestaurantService
            12:14:38,362 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Restaurant.IRestaurantServiceBA
            12:14:38,409 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Theatre.ITheatreService
            12:14:38,409 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Theatre.ITheatreServiceBA
            12:14:38,472 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Taxi.ITaxiService
            12:14:38,472 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Taxi.ITaxiServiceBA


            But I've debugged this to see what I'm sending and it looks okay ... the soap header looks like this ...

            action:
            http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContext
            from:
            http://localhost:8080/xts/soap/ActivationRequester
            replyto:
            http://localhost:8080/xts/soap/ActivationRequester
            to:
            http://localhost:8080/xts/soap/ActivationCoordinator

            The soap response contains this ....
            com.ctc.wstx.exc.WstxEOFException: Unexpected end of input block in end tag at [row,col {unknown-source}]: [1,998]


            If I put http://localhost:8080/xts/soap/ActivationCoordinator?wsdl in my browser should I see the coordinators published wsdl ? (I don't at the moment) Is there anyway of telling if my coordinator is running ?

            • 3. Re: XTS Demo and JBossWS 2.0
              adinn

              Ok, I think this arises because you have a more up to date version of the stax implementation library.
              There is a bug in the XTS code where an XMLStream was not being flushed before the stream it was writing to got closed. Later stax versions buffer writes which means some data gets lost, causing the unexpected EOF on the reader end.

              This has been patched for 4.4 but the patch has not been worked back into earlier releases. See JIRA issue http://jira.jboss.com/jira/browse/JBTM-282 for details. You need to patch SoapMesageBase.output() as per the revision indicated in the JIRA -- here's a diff of the latest version against the previous version:


              +++ WS-C/dev/src/com/arjuna/webservices/soap/SoapMessageBase.java (working copy)
              @@ -80,7 +80,10 @@
              {
              try
              {
              - writeEnvelope(SoapUtils.getXMLStreamWriter(writer)) ;
              + final XMLStreamWriter xmlWriter = SoapUtils.getXMLStreamWriter(writer);
              +
              + writeEnvelope(xmlWriter);
              + xmlWriter.flush();
              }
              catch (final XMLStreamException xmlse)
              {


              • 4. Re: XTS Demo and JBossWS 2.0
                macktheknife73

                Thanks for the great support ... that worked .... however the buisness webservice calls are failing as well .... looking at the code it seems that the targetAddress is set to ${restaurantATURL} ... is this because of the binding wranings I'm getting at startup ?


                14:36:11,378 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Restaurant.IRestaurantService
                14:36:11,378 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Restaurant.IRestaurantServiceBA
                14:36:11,425 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Theatre.ITheatreService
                14:36:11,425 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Theatre.ITheatreServiceBA
                14:36:11,456 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Taxi.ITaxiService
                14:36:11,472 WARN [JAXRPCServerMetaDataBuilder] Cannot obtain SEI mapping for: com.arjuna.xts.nightout.services.Taxi.ITaxiServiceBA



                14:36:34,910 INFO [STDOUT] CLIENT: calling business Web Services...
                14:39:20,133 INFO [STDOUT] CLIENT: problem:
                14:39:20,133 INFO [STDOUT] java.rmi.RemoteException: Call invocation failed; nested exception is:
                java.lang.IllegalArgumentException: Malformed endpoint address
                14:39:20,133 INFO [STDOUT] at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:536)
                14:39:20,133 INFO [STDOUT] at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
                14:39:20,133 INFO [STDOUT] at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
                14:39:20,148 INFO [STDOUT] at $Proxy133.bookSeats(Unknown Source)
                14:39:20,148 INFO [STDOUT] at com.arjuna.xts.nightout.clients.jboss.BasicClient.testAtomicTransaction(BasicClient.java:281)
                14:39:20,148 INFO [STDOUT] at com.arjuna.xts.nightout.clients.jboss.BasicClient.doGet(BasicClient.java:230)
                14:39:20,148 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                14:39:20,148 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                14:39:20,148 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                14:39:20,148 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                14:39:20,148 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                14:39:20,148 INFO [STDOUT] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                14:39:20,148 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                14:39:20,148 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                14:39:20,148 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                14:39:20,148 INFO [STDOUT] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                14:39:20,148 INFO [STDOUT] at java.lang.Thread.run(Thread.java:619)
                14:39:20,148 INFO [STDOUT] Caused by: java.lang.IllegalArgumentException: Malformed endpoint address
                14:39:20,148 INFO [STDOUT] at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(RemotingConnectionImpl.java:245)
                14:39:20,148 INFO [STDOUT] at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:162)
                14:39:20,148 INFO [STDOUT] at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
                14:39:20,148 INFO [STDOUT] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
                14:39:20,148 INFO [STDOUT] at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
                14:39:20,148 INFO [STDOUT] ... 25 more
                14:39:20,148 INFO [STDOUT] Caused by: java.net.MalformedURLException: Invalid url ${restaurantATURL}?datatype=JBossWSMessage
                14:39:20,148 INFO [STDOUT] at org.jboss.remoting.InvokerLocator.(InvokerLocator.java:172)
                14:39:20,148 INFO [STDOUT] at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(RemotingConnectionImpl.java:222)
                14:39:20,148 INFO [STDOUT] ... 29 more


                The wsdl looks fine ...

                <definitions targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant">
                 <message name="bookSeatsRequest">
                 <part name="in0" type="xsd:int"/>
                 </message>
                 <message name="bookSeatsResponse"/>
                 <portType name="IRestaurantService">
                 <operation name="bookSeats" parameterOrder="in0">
                 <input message="impl:bookSeatsRequest" name="bookSeatsRequest"/>
                 <output message="impl:bookSeatsResponse" name="bookSeatsResponse"/>
                 </operation>
                 </portType>
                 <binding name="RestaurantServiceATSoapBinding" type="impl:IRestaurantService">
                 <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                 <operation name="bookSeats">
                 <wsdlsoap:operation soapAction=""/>
                 <input name="bookSeatsRequest">
                 <wsdlsoap:body namespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant" use="literal"/>
                 </input>
                 <output name="bookSeatsResponse">
                 <wsdlsoap:body namespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant" use="literal"/>
                 </output>
                 </operation>
                 </binding>
                 <service name="IRestaurantServiceService">
                 <port binding="impl:RestaurantServiceATSoapBinding" name="RestaurantServiceAT">
                 <wsdlsoap:address location="http://127.0.0.1:8080/xtsdemowebservices/RestaurantServiceAT"/>
                 </port>
                 </service>
                </definitions>
                


                • 5. Re: XTS Demo and JBossWS 2.0
                  macktheknife73


                  D'oh ... seems like the scripts weren't updating client-web-app.xml seems to be working now, thanks again for the help

                  • 6. Re: XTS Demo and JBossWS 2.0
                    adinn

                    no problem. glad it's working.