aspose file tools*
The moose likes Web Services and the fly likes Deployable AXIS war Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Deployable AXIS war" Watch "Deployable AXIS war" New topic
Author

Deployable AXIS war

Christina Shah
Ranch Hand

Joined: Oct 27, 2006
Posts: 31
I have deployed a web service in AXIS under Tomcat and it works well. Now, I want to deploy the same service as a deployable application in production where I do not have AXIS. For this I created a war with lib and web.xml from AXIS. When I start Tomcat it comes up without any errors, but how do I deploy this application in Tomcat?
Do I need a server-config.wsdd?
What should go in the web.xml ( currently it is AXIS default web.xml).
Do I need to use java org.apache.axis.client.AdminClient for deployment? If yes, then how?

TIA
Chris
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39537
    
  27
Just deploy the complete Axis web app, but
  • add the classes that make up your WS (in either the lib or the classes directory)
  • include the server-config.wsdd file that Axis created on your development machine (there may be some settings -like directories- that pertain to that particular machine, and which you need to adapt for the production server)
  • leave the web.xml file as it is


  • [ March 20, 2007: Message edited by: Ulf Dittmer ]

    Ping & DNS - updated with new look and Ping home screen widget
    Christina Shah
    Ranch Hand

    Joined: Oct 27, 2006
    Posts: 31
    Thanks Ulf.

    After expanding the war in my tomcat :
    I have the jar (TestWebService.jar) in my lib.
    Default AXIS server-config.wsdd and web.xml in my WEB-INF.
    Do I need to do any deployment ?

    How can I invoke this Service ?
    The url in my wsdl is
    <soap:address location="http://localhost:8080/axis/services/TestSoapBinding"/>

    However the URL of my deployed webapp is ( war is called TestWebService.war)
    http://localhost:8080/TestWebService.

    Should these match ?

    TIA
    Chris
    Ulf Dittmer
    Marshal

    Joined: Mar 22, 2005
    Posts: 39537
        
      27
    Yes, the URLs need to match, so the web app needs to be called "axis".

    And you need to use not the default Axis server-config.wsdd, but the one created by Axis after you have deployed your WS. Axis changes this file to include information for each WS that gets deployed.
    [ March 20, 2007: Message edited by: Ulf Dittmer ]
    Christina Shah
    Ranch Hand

    Joined: Oct 27, 2006
    Posts: 31
    Thanks for the quick response. So is this acceptable ?

    <soap:address location="http://localhost:8080/axis/services/TestSoapBinding"/>

    URL of deployed webapp ( rename war to axis.war)
    http://localhost:8080/axis.

    And I don't understand what you mean by including the server-config.wsdd after it was deployed. Isn't it a part of the axis.war which has to be deployed ?

    TIA
    Chris
    Ulf Dittmer
    Marshal

    Joined: Mar 22, 2005
    Posts: 39537
        
      27
    So is this acceptable ?

    If that's the address you used during development, then it should work in production. Of course, the server name needs to be adapted.

    And I don't understand what you mean by including the server-config.wsdd after it was deployed. Isn't it a part of the axis.war which has to be deployed ?


    Yes it is, but the file that needs to be included in axis.war is not the one that comes with the Axis distribution (which is how I interpreted your words "Default AXIS server-config.wsdd"), but the one that Axis created on your development machine after you deployed the WS (not axis itself). If you're in doubt which one to use, open it and take a peek it - the correct one should have plenty of stuff in it that relates to your WS.
    [ March 20, 2007: Message edited by: Ulf Dittmer ]
    Christina Shah
    Ranch Hand

    Joined: Oct 27, 2006
    Posts: 31
    Thanks for your help Ulf. Things work now.

    I was already using the server-config.wsdd generated by a prior axis deployment. I renamed the war to axis.war and it deployed successfully.

    Chris
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Deployable AXIS war
     
    Similar Threads
    Unable to Deploy a web service on WAS 5.0
    Using JAX-RPC in a WebStart application
    Deploying a web service on an actual server
    How to run web service in Tomcat?
    For Web Service, if I have WAS and RAD, do I still need Axis ?