6 Replies Latest reply on Nov 1, 2007 9:01 PM by Vance Karimi

    XTS demo and webMethods

    Vance Karimi Newbie

      We are attempting to run the XTS demo from JBossts_4_2_3_SP7 within the webMethods 7 container. (I know it's suggested that webmethods 5 is used).

      I've changed the package structure to suit wm7 and the latest glue, deployed the package and activated/loaded it successfully within the wm container. The JSP loads ok, but clicking the submit fails with the following stack trace in wm.

      ...
      CLIENT: obtaining userTransaction...
      CLIENT: starting the transaction...
      CLIENT: problem:
      com.arjuna.wst.SystemException: java.lang.NullPointerException
       at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.startTransaction
      (UserTransactionImple.java:236)
       at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransa
      ctionImple.java:105)
       at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransa
      ctionImple.java:95)
       at com.arjuna.xts.nightout.clients.webmethods.BasicClient.testAtomicTran
      saction(BasicClient.java:247)
       at com.arjuna.xts.nightout.clients.webmethods.BasicClient.doGet(BasicCli
      ent.java:207)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:237)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:214)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
      ContextValve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:152)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:462)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:137)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:118)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      
       at com.wm.app.b2b.server.web.ISConnector.invoke(ISConnector.java:285)
       at com.wm.app.b2b.server.web.WebContainer.process(WebContainer.java:183)
      
       at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:312)
       at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
       at java.lang.Thread.run(Thread.java:595)
      


      Jbossts is running in standalone with the following output, but I don't think it's actually doing much.

      C:\Java\JBOSSTS_4_2_3_SP7\bin>rem
      Environment variable JAVA_HOME set to "C:\webMethods7\jvm\win150"
      Environment variable JBOSSTS_HOME set to "C:\Java\JBOSSTS_4_2_3_SP7"
      Setting up environment
      [ base configuration loaded from classpath orb.properties ]
      [ configuration jacorb loaded from file C:/Java/JBOSSTS_4_2_3_SP7/jacorb_2_1\etc
      \jacorb.properties ]
      [ configuration jacorb loaded from classpath]
      [30-10-2007 09:58:40:673] jacorb.orb:INFO:
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       JacORB V 2.2.2, www.jacorb.org
       (C) The JacORB project 1-Jun-2005
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [30-10-2007 09:58:40:845] jacorb.orb.intercept:INFO: InterceptorManager started
      with 1 SIs, 1 CIs and 1 IORIs
      [30-10-2007 09:58:41:142] jacorb.poa:INFO: oid:
      00 15 1B 38 32 22 2A 32 01 02 0F ...82"*2...
      object is activated
      [30-10-2007 09:58:41:455] jacorb.orb.giop:INFO: ClientConnectionManager: created
       new conn to target 172.21.6.57:1295
      **checking 0
      **registering**
      Ready
      [30-10-2007 09:58:41:455] jacorb.orb:INFO: ORB run
      


      I don't see how we are configuring the package within wm to tell it to use jbossts standalone (no place to specify host/port).

      Anyone have any ideas?

      Ultimately, we would like to explore the idea of an orchestrated/coordinated CICS transaction and participating web services in webmethods, enabled using jboss transaction (XTS). This transaction context needs to be propogated to wm and a separate application server using JTA. I think the transaction bridging would help out here. Any thoughts from the community?

      Thanks
      Vance

        • 1. Re: XTS demo and webMethods
          Andrew Dinn Master

          Hmm, interesting stack trace. Here is the line of code at which the NPE occurs:

          }
          catch (final Exception ex)
          {
          ==> throw new SystemException(ex.toString());
          }
          }

          It's hard to see how you can get an NPE here without either i) modification to the XTS source or ii) a JVM/Java compilation error. Can you try running inside a debugger? This may help you to see what is really going on.

          • 2. Re: XTS demo and webMethods
            Vance Karimi Newbie

             


            modification to the XTS source


            There's been no mods to the source.

            a JVM/Java compilation error


            The sample suggests to use 1.4, but I do use 1.5, but given wm 7 runs under 1.5 and the latest jbossts should be ok with 1.5, then not sure how this may affect things.

            Can you try running inside a debugger?


            This was a good hint. During debugging, I found when the UserTransaction is first created in the client, the _activationCoordinatorService attribute is null. I added the following to the wstx.xml and solved the first problem.

             <property
             name="com.arjuna.mw.wst.coordinatorURL"
             value="http://localhost:5555/xts/soap/ActivationCoordinator"/>
            


            This contains the host and port of the webmethods container. Now I get the following error:

            CLIENT: obtaining userTransaction...
            CLIENT: starting the transaction...
            CLIENT: problem:
            com.arjuna.wst.SystemException: Sender[[com.arjuna.webservices.transport.http.HttpClient_4] - Invalid response code returned: 404]
             at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.startTransaction(UserTransactionImple.java:232)
             at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:105)
             at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:95)
             at com.arjuna.xts.nightout.clients.webmethods.BasicClient.testAtomicTransaction(BasicClient.java:247)
             at com.arjuna.xts.nightout.clients.webmethods.BasicClient.doGet(BasicClient.java:207)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            ...
            


            I also tried deploying to a coordinator in jboss and point the com.arjuna.mw.wst.coordinatorURL property to jboss and got the same 404 error.

            My web.xml contains:

            <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
             version="2.4">
            
            
             <!-- jbosstx specific -->
             <!-- Initialise the Task Manager -->
             <context-param>
             <param-name>TaskManager.minWorkerCount</param-name>
             <param-value>0</param-value>
             </context-param>
             <context-param>
             <param-name>TaskManager.maxWorkerCount</param-name>
             <param-value>10</param-value>
             </context-param>
             <listener>
             <listener-class>com.arjuna.services.framework.admin.TaskManagerInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WS-C services -->
             <listener>
             <listener-class>com.arjuna.webservices.wscoor.server.ActivationCoordinatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wscoor.server.ActivationRequesterInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wscoor.server.RegistrationCoordinatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wscoor.server.RegistrationRequesterInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WS-C -->
             <listener>
             <listener-class>com.arjuna.wsc.messaging.deploy.CoordinationInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WSCF -->
             <listener>
             <listener-class>com.arjuna.mw.wsc.deploy.WSCFInitialisation</listener-class>
             </listener>
            
             <!-- Initialise Arjuna TX services -->
             <listener>
             <listener-class>com.arjuna.webservices.wsarjtx.server.TerminationParticipantInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsarjtx.server.TerminationCoordinatorInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WS-AT services -->
             <listener>
             <listener-class>com.arjuna.webservices.wsat.server.CompletionCoordinatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsat.server.CompletionInitiatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsat.server.CoordinatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsat.server.ParticipantInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WS-BA services -->
             <listener>
             <listener-class>com.arjuna.webservices.wsba.server.CoordinatorCompletionCoordinatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsba.server.CoordinatorCompletionParticipantInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsba.server.ParticipantCompletionCoordinatorInitialisation</listener-class>
             </listener>
             <listener>
             <listener-class>com.arjuna.webservices.wsba.server.ParticipantCompletionParticipantInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WS-T -->
             <listener>
             <listener-class>com.arjuna.wst.messaging.deploy.TransactionInitialisation</listener-class>
             </listener>
            
             <!-- Initialise WSTX -->
             <listener>
             <listener-class>com.arjuna.mw.wst.deploy.WSTXInitialisation</listener-class>
             </listener>
            
             <!-- Initialise the HTTP Client -->
             <listener>
             <listener-class>com.arjuna.webservices.transport.http.HttpClientInitialisation</listener-class>
             </listener>
            
             <servlet>
             <servlet-name>glue-soap</servlet-name>
             <servlet-class>electric.server.http.ServletServer</servlet-class>
             <init-param>
             <param-name>httpRegistryRoot</param-name>
             <param-value>/</param-value>
             </init-param>
             <!--
             <init-param>
             <param-name>electric.http.url</param-name>
             <param-value>http://host:port/context</param-value>
             </init-param>
             -->
             <load-on-startup>1</load-on-startup>
             </servlet>
            
             <servlet>
             <servlet-name>glue-console</servlet-name>
             <servlet-class>electric.console.ConsoleServlet</servlet-class>
             <init-param>
             <param-name>soapServletContext</param-name>
             <param-value>/services</param-value>
             </init-param>
             <load-on-startup>2</load-on-startup>
             </servlet>
            
             <servlet>
             <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
             <servlet-class>com.arjuna.webservices.transport.http.HttpServiceMultiplexorServlet</servlet-class>
             <!--
             The BaseHttpURI and BaseHttpsURI parameters specify the default values
             used to generate the service URIs without reference to an incoming
             request.
             -->
             <init-param>
             <param-name>BaseHttpURI</param-name>
             <param-value>http://localhost:5555/xtsdemo/soap/</param-value>
             </init-param>
             <!--
             <init-param>
             <param-name>BaseHttpsURI</param-name>
             <param-value>https://localhost:5555/xts-demo/soap/</param-value>
             </init-param>
             <init-param>
             <param-name>LogPackets</param-name>
             <param-value>true</param-value>
             </init-param>
             -->
             <load-on-startup>1</load-on-startup>
             </servlet>
            
             <servlet>
             <servlet-name>Basic Client Servlet</servlet-name>
             <servlet-class>com.arjuna.xts.nightout.clients.webmethods.BasicClient</servlet-class>
             <init-param>
             <param-name>xtsdemobase.url</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/</param-value>
             </init-param>
             <init-param>
             <param-name>restaurantATURL</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/RestaurantServiceAT.wsdl</param-value>
             </init-param>
             <init-param>
             <param-name>restaurantBAURL</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/RestaurantServiceBA.wsdl</param-value>
             </init-param>
             <init-param>
             <param-name>taxiATURL</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/TaxiServiceAT.wsdl</param-value>
             </init-param>
             <init-param>
             <param-name>taxiBAURL</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/TaxiServiceBA.wsdl</param-value>
             </init-param>
             <init-param>
             <param-name>theatreATURL</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/TheatreServiceAT.wsdl</param-value>
             </init-param>
             <init-param>
             <param-name>theatreBAURL</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/TheatreServiceBA.wsdl</param-value>
             </init-param>
             </servlet>
            
             <servlet>
             <servlet-name>calc</servlet-name>
             <servlet-class>examples.gluequickstart.calculator2.CalcServlet</servlet-class>
             <init-param>
             <param-name>calculator.url</param-name>
             <param-value>http://localhost:5555/web/xtsdemo/services/calculatorRPC.wsdl</param-value>
             </init-param>
             <load-on-startup>1</load-on-startup>
             </servlet>
            
             <servlet-mapping>
             <servlet-name>calc</servlet-name>
             <url-pattern>/calcServlet</url-pattern>
             </servlet-mapping>
            
             <servlet-mapping>
             <servlet-name>Basic Client Servlet</servlet-name>
             <url-pattern>/basicclient</url-pattern>
             </servlet-mapping>
            
             <servlet-mapping>
             <servlet-name>glue-soap</servlet-name>
             <url-pattern>/services/*</url-pattern>
             </servlet-mapping>
            
             <servlet-mapping>
             <servlet-name>glue-console</servlet-name>
             <url-pattern>/console/*</url-pattern>
             </servlet-mapping>
            
             <servlet-mapping>
             <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
             <url-pattern>/soap/*</url-pattern>
             </servlet-mapping>
            
            <!-- ====================== -->
            <!-- Security configuration -->
            <!-- ====================== -->
             <security-constraint>
             <web-resource-collection>
             <web-resource-name>Developers</web-resource-name>
             <url-pattern>/services/pubstringSOAP*</url-pattern>
             <url-pattern>/console/*</url-pattern>
             </web-resource-collection>
            <!-- pubstringSOAP requires Developers credentials -->
             <auth-constraint>
             <role-name>Developers</role-name>
             </auth-constraint>
             </security-constraint>
            
             <security-constraint>
             <web-resource-collection>
             <web-resource-name>Administrators</web-resource-name>
             <url-pattern>/services/calculatorSOAP*</url-pattern>
             </web-resource-collection>
            
            <!-- calculatorSOAP requires Administrators credentials -->
             <auth-constraint>
             <role-name>Administrators</role-name>
             </auth-constraint>
             </security-constraint>
            
             <security-role>
             <role-name>Developers</role-name>
             </security-role>
            
             <security-role>
             <role-name>Adminstrators</role-name>
             </security-role>
            
            </web-app>
            


            • 3. Re: XTS demo and webMethods
              Vance Karimi Newbie

              Given the activation service is invoked asynchronously, it calls back on the invoking service to provide the result of the activation. When I ran the coordinator in jboss, the 404 error message appeared in the jboss logs. This sounds like the activation service cannot find the endpoint of the invoking service to deliver the response?

              • 4. Re: XTS demo and webMethods
                Andrew Dinn Master

                Ok, given these two config settings


                I added the following to the wstx.xml and solved the first problem.

                Code:




                and


                My web.xml contains:

                Code:

                <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
                . . .

                <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
                <servlet-class>com.arjuna.webservices.transport.http.HttpServiceMultiplexorServlet</servlet-class>
                <!--
                The BaseHttpURI and BaseHttpsURI parameters specify the default values
                used to generate the service URIs without reference to an incoming
                request.
                -->
                <init-param>
                <param-name>BaseHttpURI</param-name>
                <param-value>http://localhost:5555/xtsdemo/soap/</param-value>
                </init-param>
                . . .


                you appear to be telling your app to talk the ActivationCoordinator at http://localhost:5555/xts/soap/ but telling the server to start up the service at http://localhost:5555/xtsdemo/soap/. Perhaps this is part of the problem.

                • 5. Re: XTS demo and webMethods
                  Andrew Dinn Master

                   

                  "persabi2" wrote:

                  Given the activation service is invoked asynchronously, it calls back on the invoking service to provide the result of the activation. When I ran the coordinator in jboss, the 404 error message appeared in the jboss logs. This sounds like the activation service cannot find the endpoint of the invoking service to deliver the response?

                  I doubt that is the case. The activation service sends responses and faults back to the invoker using the incoming addressing properties. So, it knows where any response needs to be sent to -- the same place as where the request came from and the 404 was returned to.

                  I believe the log entry you are seeing is merely a server side log of a generic brushoff because you are not addressing the activation coordinator correctly. Try resetting the URL in your webapp.xml consistent with the setting in wstx.xml as I explained in my last note.

                  • 6. Re: XTS demo and webMethods
                    Vance Karimi Newbie

                     


                    Try resetting the URL in your webapp.xml consistent with the setting in wstx.xml as I explained in my last note.


                    On the mark again, however the soap multiplexor servlet uri was not formatted the way wm likes it. I realised this when I was getting a Object Not Found (xts/soap/ActivationCoordinator) when I tried http://localhost:5555/xts/soap/ActivationCoordinator in a web browser. This meant the servlet wasn't available on the invoker.

                    I also could not get the coordinator working under wm. Instead, I ran the coordinator under jboss istead. There, I was getting the following:

                    09:19:04,752 ERROR [STDERR] com.arjuna.webservices.SoapFault: Sender[[com.arjuna.webservices.transport.http.HttpClient_4] - Invalid response code returned: 404]
                    
                    09:19:04,752 ERROR [STDERR] at com.arjuna.webservices.transport.http.HttpClient.invokeRequest(HttpClient.java:202)
                    09:19:04,752 ERROR [STDERR] at com.arjuna.webservices.transport.http.HttpClient.invokeOneWay(HttpClient.java:93)
                    09:19:04,752 ERROR [STDERR] at com.arjuna.webservices.wsaddr.client.BaseWSAddrClient.sendOneWay(BaseWSAddrClient.java:125)
                    09:19:04,752 ERROR [STDERR] at com.arjuna.webservices.wscoor.client.ActivationRequesterClient.sendCreateCoordinationResponse(ActivationRequesterClient.java:
                    100)
                    09:19:04,752 ERROR [STDERR] at com.arjuna.wsc.messaging.ActivationCoordinatorProcessorImpl.createCoordinationContext(ActivationCoordinatorProcessorImpl.java
                    :92)
                    09:19:04,752 ERROR [STDERR] at com.arjuna.webservices.wscoor.handlers.CreateCoordinationContextHandler$1.executeTask(CreateCoordinationContextHandler.java:6
                    2)
                    09:19:04,752 ERROR [STDERR] at com.arjuna.services.framework.task.TaskWorker.run(TaskWorker.java:65)
                    09:19:04,752 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
                    


                    After changing the soap multiplexor servlet uri to http://localhost:5555/web/xtsdemo/soap/ and running the coordinator on jboss, the sample worked. woohooo

                    However it looks like wm services (not web services, but plain old webmethods flow services) do NOT participate in a txn. doh!