My peers and I have been discussing my difficulties in generating a WAR
file from the generated artifacts (from jax-ws). We are unsure if my
WAR file is un-useable, my artifacts are incomplete, or if the WAR file
is incompatible with my application servers. I have tried using
WebLogic 9.2 and Apache 5.5 (consecutively, not concurrently; both local
installations).
If possible, could copies of WAR files generated from the sample classes
so that we may test these WAR files against our application servers to
verify compatibility.
If anyone would be willing to help, below is a sample of one of my
trials. I am new to web services, so I am willing to accept that
anything or everything I have done may be completely wrong. Also, I am
trying to avoid any use of ant as I always encounter numerous headaches
when I attempt to use it; however, if ant is the only way to straighten
out my mess, I will manage.
Thank you,
Chris Ferguson
ProLogic, Inc.
Procedure:
System: Windows XP, SP2
Install J2EE with JDK6 (JRE is up to date). Install eclipse and update
with all available Callisto packages. Extract jax-ws locally. Set
JAXWS_HOME and JDK6_HOME environment variables. Follow steps in users
guide for using jax-ws with JDK6. Install trial versions of WebSphere
and WebLogic, also complete install of Apache Tomcat 5.5.
In eclipse, create a new "Dynamic Web Project"
Create a new package called "ws"
Add an empty class to ws with the following text
package ws;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class JaxWsService {
@WebMethod
public String sayHello(String message) {
System.out.println("sayHello:" + message);
return "You said '" + message + "'";
}
}
Save and switch to the command line. Go to <my
workspace>\helloSVCtest\src\. Execute the following command: wsgen
-classpath ../build/classes/ -wsdl -s . JaxWsService
Back in eclipse, refresh project explorer and "export project" with
target being a WAR file.
Also tested was to collect the files into a structure manually, zip them
with winzip, and change the extension to war.
Please see attached files for each WAR file, they should be aptly
labeled.