views:

43

answers:

1

Possible Duplicate:
How to change database settings for a deployed war file?

OK I will outline the steps:

  1. I downloaded a perfectly functioning WAR fIle
  2. Uncompressed it
  3. Changed the database settings in the Database.properties file
  4. Made it a WAR file again
  5. Imported it in Eclipse IDE using File -> Import
  6. Ran a test client by right clicking the WSDL and selecting Web Services->Generate Client

Now when I insert data using the client, it is still entering that on the old server and not the new one. I am so lost in terms of modifying WAR files.

+1  A: 

If you're using Tomcat, the only database settings relevant will probably be in your WAR file.

A couple of thoughts:

  1. Did you downloaded the WAR file from a production environment?
  2. Does the WSDL-generated client refer to that production environment?
  3. Did you deploy the WAR locally, so that you could test the new settings?

My (somewhat educated) guess is that your code in Eclipse is using your deployed code, not the modified WAR you're trying to test locally. You will probably have to deploy the WAR locally and ensure your test client uses the local server instead of the deployed location.

My apologies if any of my assumptions are off the mark.

mlschechter
Thank you so much for the thorough answer. Yes I downloaded the WAR file from a production environment. It had 3 folders META-INF, WEB-INF, and wsdl. I am assuming that using that wsdl is what is causing the problem. Do I then need to recreate the WSDL just so it references localhost. I am new to Eclipse IDE and not sure if we have to recreate WSDL everytime we make a change. I hope I am making sense.
jini
I don't think you need to change the WSDL - just check the URL of your generated client. If it points to the production host, you'll have to manually change it to point to a locally deployed WAR (one that has the changes).Do you have a local instance of Tomcat you can deploy the WAR to?
mlschechter
The URL of generated client is localhost. Now when I do explore the WSDL it references the production URL for web service. Would that make a difference?
jini
I think I phrased my question poorly. I meant to ask for the URL that is used by the generated client.Would it be possible to post any or all of the following as updates to your question?1) Your web.xml for the WAR2) Your database configuration (either old or new or both)3) The URL used by the client to access the web service
mlschechter