Date: 2004-05-18T08:07:04 Editor: PhilipMarkDonaghy <[EMAIL PROTECTED]> Wiki: Apache Geronimo Wiki Page: HowToTutorial URL: http://wiki.apache.org/geronimo/HowToTutorial
HelloService documented. Change Log: ------------------------------------------------------------------------------ @@ -99,3 +99,95 @@ === HelloService Example === Try the helloservice example but be aware that Sun's application server supports web services using an entirely different deployment process. See HowToAxisGeronimo for more on web services. + +==== Build the Example ==== + +cd j2eetutorial14/examples/jaxrpc/helloservice +ant + +Ant reports that the BUILD FAILED but if the compile-service task passed we will be ok + +==== Create a Web Application ==== + +Use the web application created in HowToAxisGeronimo but name the directory MyHelloService. +cp -R build/helloservice MyHelloService/WEB-INF/classes/ + +==== Create the geronimo-jetty.xml ==== + +<?xml version="1.0" encoding="UTF-8"?> +<web-app + xmlns="http://geronimo.apache.org/xml/ns/web/jetty" + configId="your/domain/name/j2eetutorialhelloservice" + parentId="org/apache/geronimo/Server" + > + <context-root>/hello-jaxrpc</context-root> + <context-priority-classloader>false</context-priority-classloader> +</web-app> + +==== Create the WAR File ==== + +cd MyHelloService +jar -cf ../MyHelloService.war * + +==== Deploy the WAR File ==== + +cd incubator-geronimo/target +java -jar bin/deployer.jar --install --module MyHelloService.war + +==== Start the Server ==== + +java -jar bin/server.jar your/domain/name/j2eetutorialhelloservice + +==== Test the Web Application ==== + +http://localhost:8080/hello-jaxrpc gives you some links to check out. + +==== Create the file MyHelloService/WEB-INF/deploy.wsdd ==== + +<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> + <service name="hello" provider="java:RPC"> + <parameter name="className" value="helloservice/HelloImpl"/> + </service> +</deployment> + +==== Deploy the Web Service ==== + +Executing the Axis client as shown here. + +cd MyHelloService/WEB-INF +java -cp $AXISCLASSPATH org.apache.axis.client.AdminClient -l local://localhost:8080/hello-jaxrpc/servlet/AdminServlet deploy.wsdd +Processing file deploy.wsdd +<Admin>Done processing</Admin> + +==== Repackage the WAR File ==== + +The WEB-INF directory now includes the file server-config.xml which requires redeployment. + +cd .. +jar -cf ../MyHelloService.war * + +==== Stop the Server ==== + +Ctrl-C + +==== Redeploy the WAR File ==== + +cd incubator-geronimo/target +java -jar bin/deployer.jar --install --module MyHelloService.war + +==== Restart the Server ==== + +java -jar bin/server.jar your/domain/name/j2eetutorialhelloservice + +==== Test the Web Service Endpoint ==== + +http://gisig.com:8080/hello-jaxrpc/servlet/AxisServlet should now show the hello web service. +http://localhost:8080/hello-jaxrpc/services/hello?WSDL shows you the WSDL for the hello service. + +==== Use the Tutorial Clients ==== + +The J2EE Tutorial comes with a number of clients that use this web service. + +==== Use Axis WSDL2Java to Generate a Client === + +Stay tuned.
