6 Replies Latest reply on Feb 23, 2005 8:33 AM by thomas.diesler

    JBossWS with Axis 1.2 Client (Flawed architecture?)

    ranaaich

      Hello All,

      This is a question regarding JBossWS and Axis Client.

      Let me explain my project architechture in this regard.

      I'm working with two laptops. One will run webervices and web-application for storeX(say) and another will do the same for store Y. I have written the web-application and web-service(JBossWS) and deployed it on JBOss for storeX and storeY. In the storeX web application there is a call to store Y's web-service and vice-versa for StoreY. I have used Axis Client for this.

      And here I find the problem. When I put axis.jar (of Axis distribution axis-1_2RC2) in %JBOSS_HOME%\server\default\lib it is successfully querying StoreY webservices. But presence of axis.jar in %JBOSS_HOME%\server\default\lib is acting as a hinderence in deploying StoreX's own web-service. If I put axis.jar in my WEB-INF\lib directory even then the web-application is not seeing it! It seems the axis.jar has to reside in JBOSSs classpath. If I define %JBOSS_CLASSPATH% with axis.jar then the storeX webapplication works fine but the storeX web-service cannot be deployed at all.

      What should be my approach in this case. Where shall I put the axis.jar!

      I also test my web-services by running the command line Axis Client program. Before running the program I run my setenv.bat to set the classpath that points to Axis1.2 lib folder and the application fetches results from storeY. Similar idea is put my web application also - but it seems in the JBOSS server I need to do something extra.

      Any suggestion will be very much appreciated.

      Regards,

      Rana.

        • 1. Re: JBossWS with Axis 1.2 Client (Flawed architecture?)
          ranaaich

          Here is a clue:

          I replaced the axis.jar by axis-ws4ee.jar (jboss4.0.0) in %JBOSS_HOME%\server\defualt\deploy\lib and started the JBoss.

          My webserice started up well, But the web-application for storeX while querying StoreY has returned an exception:

          ------------------------------------------------------------------------
          Caused by: java.lang.NoSuchMethodError: org.apache.axis.description.TypeDesc.(Ljava/lang/Class;Z)V
          at qs.QueryDataRequestType.(QueryDataRequestType.java:162)
          at com.nri.storeX.ui.InventoryQueryDispatchAction.queryOtherStores(InventoryQueryDispatchAction.java:179)
          ... 43 more

          -------------------------------------------------------------------------

          It seems org.apache.axis.description.TypeDesc class in axis.jar(in axis-1_2RC2 distrubution) and axis-ws4ee.jar for JBOSS 4.0.0 has some differences - namely, method init is not present in the later.

          • 2. Re: JBossWS with Axis 1.2 Client (Flawed architecture?)
            anil.saldhana

            http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866172#3866172

            Vishal from Australia documented the steps he followed to integrate custom axis jars (Axis 1.1 and 1.2)

            • 3. Re: JBossWS with Axis 1.2 Client (Flawed architecture?)
              thomas.diesler

              You cannot use JBossWS and the apache axis libraries at the same time in jboss. Starting from jboss-4.0.2 we will move the axis package required by ws4ee to a org.jboss package to avoid these types of classloading issues.

              What is your reason not to use ws4ee clients on storeX/Y?

              • 4. Re: JBossWS with Axis 1.2 Client (Flawed architecture?)
                ranaaich

                Ideally there would be say 50 retail store chain.

                So from each store query will go to other 49 stores. Each webservice is designed to query the local Store Database and return the inventory status for a particular item.
                In that case I have to write ws4ee clients for all 49 stores.

                I agree that using apache axis clients I also run WSDL2Java 49 times. But I figured out if only the ***ServiceLocator.class(genearted by WSDL2Java) is seperated out are kept in Store Specfic directory then it is mush more easier to maintain. (As all the stores wil have have the same wsdl and xsd thus only the *ServiceLocator.class will be differ from store to store).

                Thus the directory structure would be as below:

                - queryService
                - StoreY
                - StoreX
                - StoreZ
                - Store49

                etc. The queryService directory will have same *RequestType, *ResponseType, *SoapBindingStub.class *Service.class for all the 49 stores. All I have to do is to compile this and put the jar file in the %JBoss%\server\default\lib directory.

                This schema is working for the command line environment. But when I go for JBoss environment - I get this error.

                • 5. Re: JBossWS with Axis 1.2 Client (Flawed architecture?)
                  ranaaich

                  Hello Thomas, Anil

                  Thanks for keeping this thread alive! Can you give us a tentative timeframe when the jboss-4.0.2 version will be released?

                  Regards,

                  Rana Aich

                  • 6. Re: JBossWS with Axis 1.2 Client (Flawed architecture?)
                    thomas.diesler